Re: connection lost after a few hours
Posted by: Bill Karwin
Date: August 23, 2006 11:19AM

Yes, Connector/J connections time out after 8 hours. This isn't an issue for simple JSP developers, but affects most developers who use connection pools, or an application server.

One solution from MySQL engineers is to use the connection parameter "autoReconnect".

Also, you should catch exceptions and implement some re-connect and re-try code. There is an example at the following page:
http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshooting.html

See the subsection within that page: "24.3.5.3.4: I have a servlet/application that works fine for a day, and then stops working overnight"

Regards,
Bill K.

Options: ReplyQuote


Subject
Written By
Posted
Re: connection lost after a few hours
August 23, 2006 11:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.