cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL datasource going down unexpectedly

Former Member
0 Kudos

I am having problems maintaining a MySQL datasource connection on my SAP NetWeaver 7.0 installation. I have successfully created the datasource using the Visual Administrator with the mysql-connector-java-5.1.7-bin.jar driver, and I am able to read/write to the database without any issues too. However, I noticed that when the database is idle for quite some time (a few hours), the connection drops unexpectedly when I try to access it again later via JDBC code. The error message displayed is as follows:


The last packet successfully received from the server was190285 milliseconds ago.The last packet sent successfully to the server was 190285 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.

I tried to modify the JDBC URL to configure the autoReconnect property as follows:


jdbc:mysql://localhost:3306/abc?allowReconnect=true

But it just doesn't seem to take effect. Can anybody help me with this? Any help would be greatly appreciated. Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

Check this [link|http://www.atlassian.com/software/jira/docs/v2.5-b2/standalone-dbconfig.pdf]

Thanks

Sunny

Former Member
0 Kudos

Hi Sunny,

Thanks for the reply, but I am still seeing the same error some 8+ hours later. I did set the autoReconnect URL parameter to true, but it doesn't seem like its taking effect. Does anyone have any other suggestions?