Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

J connector. autoReconnect=true not working

843842Feb 20 2010 — edited Feb 24 2010
hi all ! Im having an issue with my app, when the app is left "iddle" during the night when someone tries to connect in the next morning they get an error saying:

The last packet sent successfully to the server was 72.264.329 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.

This is the context.XML wich controls the connection pool:
 <Resource auth="MyApp" driverClassName="com.mysql.jdbc.Driver" maxActive="-1"
  maxIdle="20" maxWait="10000" name="jdbc/MedPro" password="admin" removeAbandoned="true"
  removeAbandonedTimeout="60"
  type="javax.sql.DataSource" url="jdbc:mysql://127.0.0.1:3306/Myapp?autoReconnect/autoReconnectForPools=true" username="root"/>
Im using Mysql server 5.1 and Jconnector 5.1.11

Any help is appreciated.

THanks in advance.

Edited by: juanmanuelsanchez on Feb 20, 2010 5:09 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 24 2010
Added on Feb 20 2010
3 comments
3,614 views