问题描述:

com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure.The last packet successfully received from the server was 59,894 milliseconds ago. 

问题分析:

1、mysql数据库的等待时长小于项目配置的最大等待时长,导致报错。

show global variables like 'wait_timeout';

解决办法:

(1)数据库等待时长不变,项目的最大等待时长设为28800。

(2)项目的最大等待时长不变,数据库等待时长改为60000。

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐