show variables like  'max_execution_time'  

使用这个命令查看了,没有设置sql执行超时时间,那么大概率问题就出在阿里的Druid数据库连接池出了问题

尝试着socketTimeout由60000毫秒改成10000毫秒,果然执行了十几秒就超时报错了

socketTimeout: 120000  最后我把这个值调整到120秒才查询出来结果

com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet successfully received from the server was 10,052 milliseconds ago. The last packet sent successfully to the server was 16,185 milliseconds ago.

Logo

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

更多推荐