遇到报错问题解决办法:You should consider either expiring and/or testing connection validity before use in your application

2023年4月5日 359点热度 0人点赞 0条评论

报错的问题如下:

com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 6,866,257 milliseconds ago. The last packet sent successfully to the server was 6,866,257 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.

找了几圈,没有一个解决的。

以下是我的解决办法:

支付 ¥2.99 购买本节后解锁剩余43%的内容

小小调酒师

此刻打盹,你将做梦; 此刻学习,你将圆梦。 个人邮箱:shellways@foxmail.com

文章评论