Atomikos Forum |
|
After upgrading from 3.9.3 to 4.0.2 it appears the idle connection testing is no longer functioning as expected. We are getting the following exception while running the test query against our MySQL database:
2016-04-06 09:07:15,308 [cached14] WARN : atomikos connection pool 'XAE911': error creating proxy of connection an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s) com.atomikos.datasource.pool.CreateConnectionException: Error executing testQuery which stems from the error: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 65,855,438 milliseconds ago. The last packet sent successfully to the server was 65,855,438 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. Note that we do specify 'autoReconnect=true' in our JDBC URL. Our maxIdle parameter is the default of 60 seconds and our wait_timeout on MySQL is the default 8 hours. We expect with a test query specified that each connection should be tested after being idle for 60 seconds but this seems to no longer function in 4.0.2. Any suggestions are welcomed.
Hi,
We checked and are a bit puzzled: the 4.0 did not really change the ConnectionPool logic. In addition, a testQuery was never invoked by the pool's maintenance thread but rather only when you tried to get a connection from the pool. In summary, I don't understand what could be different here. Do you have any other information that we might be able to use so we can track what is going on? If we missed something then I would definitely like to find out... Thanks |