admin 管理员组文章数量: 1086019
服务器数据库间断性的会出现数据库连接异常的报错,报错异常为
### Error querying database. Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 34,101 milliseconds ago. The last packet sent s
uccessfully to the server was 34,103 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before us
e in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
my.ini
--增加如下配置
wait_timeout=144000
interactive_timeout=144000
-- 保存后重启mysql服务
本文标签: Testing expiring connection applicat validity
版权声明:本文标题:You should consider either expiring andor testing connection validity before use in your applicat 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/b/1738333981a1965498.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论