Hi,
I try to use DataSourcePool to connect with MySQL database. And I notice that after long inactivity or database restart connection is closed and first attempt to use it ends with this error message.
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 49,803,911 milliseconds ago. The last packet sent successfully to the server was 49,803,925 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.
I try to define validation query "Select 1" but I don't see any improvements.
Also have autoReconnect=true and autoReconnectForPools=true in connection url
Thanks