MySQL reconnects on zope application level
Hello, On several zope 2.10.6 instances we discovered issues with database connections to MySQL. Apparently MySQL seems to not automaticly reconnect connections with a timeout since version 5.0.3 due to issues with transactions. Until now, mysql-python was patched to restore that behaviour to automatically reconnect timeouted connections, but that is not the case anymore either. So from now on the database reconnects need to be done from zope applications on their own. Unfortunately the ZMySQLda adapter by Andy Dustman doesn't implement such a functionality. I cannot imagine that we are the only ones who discover this problem. Is there an easy way to implement automatic reconnects for Z MySQL Database Connections on zope application level? greetings, and thanks in advance, jonas
I don't have an easy answer but if you do dig into Andy's code and try to implement this, I would suggest you look at the ZPsycopgDA code perhaps and look for inspiration since I think that one works much better. 2008/7/16 Jonas <jonas@freesources.org>:
Hello,
On several zope 2.10.6 instances we discovered issues with database connections to MySQL. Apparently MySQL seems to not automaticly reconnect connections with a timeout since version 5.0.3 due to issues with transactions.
Until now, mysql-python was patched to restore that behaviour to automatically reconnect timeouted connections, but that is not the case anymore either.
So from now on the database reconnects need to be done from zope applications on their own. Unfortunately the ZMySQLda adapter by Andy Dustman doesn't implement such a functionality.
I cannot imagine that we are the only ones who discover this problem. Is there an easy way to implement automatic reconnects for Z MySQL Database Connections on zope application level?
greetings, and thanks in advance, jonas _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
On 16/07/2008 Peter Bengtsson wrote:
I don't have an easy answer but if you do dig into Andy's code and try to implement this, I would suggest you look at the ZPsycopgDA code perhaps and look for inspiration since I think that one works much better.
Thanks, but finally I found an easier solution :-) the 3.0 beta1 of ZMySQLDA seems to have this fixed. It doesn't allow to configure automatic reconnects, but it implements them defaultly. thanks for your help, greetings, jonas
participants (3)
-
Jonas -
Jonas Meurer -
Peter Bengtsson