Problem with mysql connection
Closed this issue · 2 comments
danilkuznetsov commented
This happens when scheduler or user invoke update data from CRM.
I think it's happening because we rarely use MySQL connections and it close after timeout
error message
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was86400 seconds ago.The last packet sent successfully to the server was 86400 seconds 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.
and
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
MESSAGE: The last packet successfully received from the server was86400 seconds ago.The last packet sent successfully to the server was 86400 seconds 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.
petrokramar commented
I think that we should change this line in application.properties to spring.datasource.crm.url=jdbc:mysql://localhost/x2crm?autoReconnect=true
danilkuznetsov commented
ok, thanks,
I have some question or proposition for you in your pull request.