Sometimes my Java / Tomcat6 / Debian Squeeze application cannot talk to the MySql server. The Tomcat application is located on the front-end server, and MySql is in a separate MySql window. Typical error:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was56588 milliseconds ago.
The last packet sent successfully to the server was 56588 milliseconds ago, which
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.
The wait time is only 60 seconds, which seems very short. If it were an hour or more, I would just set the background job to a ping DB-server every few minutes. I added the autoReconnect parameter to the opening URL, with no visible effect.
Any idea what the problem is here? thanks Pat
source
share