using the Connector/J connection property ‘autoReconnect=true’ to avoid this problem

mysql1年前 (2022)发布 megou
80 0

程序页面查看报错异常,具体如下:

Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 426,962,099 milliseconds ago. The last packet sent successfully to the server was 426,962,100 milliseconds ago. is longer than the server configured value of ‘wait_timeout’. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property ‘autoReconnect=true’ to avoid this problem.;
————————————————

在文件最后添加autoReconnect=true,多个参数之间使用&连接。

 

具体如下:

 

© 版权声明

相关文章