[odb-users] MySQL timeout: ODB not reconnecting?
Dieter Van de Walle
dieter.vandewalle at newtec.eu
Fri Feb 11 08:50:16 EST 2011
We've been using ODB for persistency for a while now, and it is working very smoothly.
There's some improvement possible, but very impressed.
I have just encountered an annoying problem with the connection management of ODB though.
When a DB connection is inactive, MySQL will timeout the connection after 8 hours.
This causes ODB to lose the connection and fail any further DB actions with the error:
"ODB error: 2006 (HY000): MySQL server has gone away" .
Apparently the 'connection_pool_factory' does not reconnect when connections are gone... ??
I was able to fix this by using the 'new_connection_factory' instead of the default 'connection_pool_factory' .
The 'connection_pool_factory' should check connection status though and reconnect if necessary it seems?
Very annoying, since this will cause all further DB activity to fail until the session is restarted.
This behaviour can be triggered by:
- MySQL default connection timeout
- Temporary network interruption
ODB is unable to recover from this when using the 'connection_pool_factory' , very annoying!
Is this a bug, or can I handle this somehow?
Dieter Van de Walle
C++/Java developer MENOS
Newtec CY N.V. Laarstraat 5, B-9100 Sint-Niklaas, Belgium
Tel +32 3 780 65 07 (direct) or +32 3 780 65 00 (switchboard)
Newtec’s MENOS system awarded IBC Innovation Award for Content Delivery & the IBC Judges’ Award Newtec’s FlexACM awarded 2009 Teleport Technology of the Year by WTA *** e-mail confidentiality footer *** This message and any attachments thereto are confidential. They may also be privileged or otherwise protected by work product immunity or other legal rules. If you have received it by mistake, please let us know by e-mail reply and delete it from your system; you may not copy this message or disclose its contents to anyone. E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore is in no way liable for any errors or omissions in the content of this message, which may arise as a result of e-mail transmission. If verification is required, please request a hard copy.
More information about the odb-users