日志消息全文:
Log Message: An error occurred while grabbing new users
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 44,567,434 milliseconds ago. The last packet sent successfully to the server was 44,567,434 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.
这对我来说很奇怪,因为那是超过 10 个小时。在过去的 10 个小时里,我的程序运行愉快且成功,包括与数据库的通信。我最好的假设是池中的单个连接已过时,但在这种情况下,我不知道为什么不会自动清理它,或者这个异常是否与该操作有关。我该如何处理?
我正在使用 c3p0 连接池。