[Zope] Autoconnect with ZMySQLDA 2.0.9
Dennis Allison
allison at shasta.stanford.edu
Tue Jan 17 20:26:00 EST 2006
After some investigation, this appears to be a mysql bug or brain-dead
semantics for mysql_ping.
See http://lists.mysql.com/mysql/190441 and
http://bugs.mysql.com/bug.php?id=14057
http://bugs.mysql.com/bug.php?id=2845
Dieter Mauer suggests the right thing is to catch the exception and then
reopen the connection (usually the "db" object has all necessary
information) and then raise an exception derived from
"ZODB.POSException.ConflictError" (in order to let your request
be repeated).
The problem appear to be present in 4.0.XX and 4.1.XX. Is it still there
in MySQL 5.0. And does MySQL-Python and ZMYSQLDA grock MySQL-5.0?
-d
On Mon, 16 Jan 2006, Dennis Allison wrote:
> I have been seeing occasional "release unlocked lock" errors from a
> storage error in a two-phase commit which really comes from a "Lost
> connection to MySQL server during query". Apparently this arises from
> a failure of self.db.ping() to find a connected database as the
> transaction is opened.
>
> It is possible that the connection has really timed out.
>
> Looking at the code it appears that ZMySQLDA does not attempt to
> recreate the connection. Is that correct?
>
> What's the recommend approach to re-establish the connection?
>
> -d
>
>
--
More information about the Zope
mailing list