[egenix-users] Products.mxODBCZopeDA.ZopeDA.ReplayTransaction question

Mathias Gibbens mathias.gibbens at gmail.com
Mon Aug 10 09:26:40 CEST 2009

Hi list,

  I have a long running program that is occasionally getting this error:

  ReplayTransaction: OperationalError on
<Products.mxODBCZopeDA.ZopeDA.DatabaseConnection "DSN=DBITS" thread
40041360/40041360 at 0x12544eac>: ('HYT00', 2006,
'[unixODBC][MySQL][ODBC 3.51 Driver][mysqld-5.0.22-standard]MySQL server
has gone away', 6113)

  When I recall the method that connects to MySQL, it returns normally.
I looked at the documentation for the ReplayTransaction exception:

'5.2.2 Class "Products.mxODBCZopeDA.ZopeDA.ReplayTransaction" 
Replay the current transaction after having rolled back any changes. 

Raising this exception will cause Zope to retry the complete
transaction. This can be useful in case a database connection was lost.'

  However, I'm not sure from the short description exactly what happens
when the exception is thrown. Does A) Zope automatically reconnect to
MySQL, and only raise this exception so I know that Zope had to
reconnect to MySQL, or B) is this exception thrown so I know that I need
to actually do something about the dropped connection? To boil it down,
can I just catch this exception, and continue in my program knowing that
the database has been successfully updated, or do I have to do something
in addition to make sure the changes have been committed?

  (Just so it's out there, I can't increase the MySQL server timeout.)

Mathias Gibbens

More information about the egenix-users mailing list