MySQL & lost server connections
I seem to remember this being asked before, but I couldn't find anything in the archives... :P Basically, it looks like I'm losing my connection from Zope to the MySQL database. While the site remains busy, it stays connected, but if there's a long dead period the connection goes away. Both Zope and MySQL are running on the same BSDI 3.1 machine. Its Zope-1.10.2 and MySQL-3.21.33b. Is there anything I can do to fix this? Here's the traceback and error: ------------------------------------------------------------------ Error type: Error value: Lost connection to MySQL server during query Traceback (innermost last): File /usr/local/lib/Zope-1.10.2/lib/python/ZPublisher/Publish.py, line 877, in publish_module File /usr/local/lib/Zope-1.10.2/lib/python/ZPublisher/Publish.py, line 590, in publish (Info: /members/index2) File /usr/local/lib/Zope-1.10.2/lib/python/OFS/DTMLMethod.py, line 155, in __call__ (Object: index2) File /usr/local/lib/Zope-1.10.2/lib/python/OFS/DTMLMethod.py, line 151, in __call__ (Object: index2) File /usr/local/lib/Zope-1.10.2/lib/python/DocumentTemplate/DT_String.py, line 513, in __call__ (Object: index2) File /usr/local/lib/Zope-1.10.2/lib/python/DocumentTemplate/DT_With.py, line 138, in render (Object: db) File /usr/local/lib/Zope-1.10.2/lib/python/DocumentTemplate/DT_In.py, line 617, in renderwob (Object: userid) File /usr/local/lib/Zope-1.10.2/lib/python/Shared/DC/ZRDB/DA.py, line 390, in __call__ (Object: CopySource) File /usr/local/lib/Zope-1.10.2/lib/python/Products/ZMySQLDA/db.py, line 171, in query error: (see above) --- John Eikenberry [jae@kavi.com - http://taos.kavi.com/~jae/] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
In article <Pine.LNX.3.96.990528114433.18413B-100000@taos.kavi.com>, John Eikenberry <jae@kavi.com> wrote:
Basically, it looks like I'm losing my connection from Zope to the MySQL database. While the site remains busy, it stays connected, but if there's a long dead period the connection goes away.
Both Zope and MySQL are running on the same BSDI 3.1 machine. Its Zope-1.10.2 and MySQL-3.21.33b. Is there anything I can do to fix this?
I believe newer versions of libmysqlclient (which may require a newer server) will reconnect transparently if the server closes the connection on timeout. Upgrading may be the simplest fix.
Ty Sarna wrote:
In article <Pine.LNX.3.96.990528114433.18413B-100000@taos.kavi.com>, John Eikenberry <jae@kavi.com> wrote:
Basically, it looks like I'm losing my connection from Zope to the MySQL database. While the site remains busy, it stays connected, but if there's a long dead period the connection goes away.
I believe newer versions of libmysqlclient (which may require a newer server) will reconnect transparently if the server closes the connection on timeout. Upgrading may be the simplest fix.
My simplest fix to this was to put wget as a cron job to request a page every 10 min.:-) Yes, the requested page must access the DB. I had to upgrade latter to be able to do an outer join, but the cron jot is still there. regards, -- Paulo Eduardo Neves mailto:neves@inf.puc-rio.br PUC-Rio de Janeiro
participants (3)
-
John Eikenberry -
Paulo Eduardo Neves -
tsarnaļ¼ endicor.com