Products.mxODBCZopeDA.ZopeDA.ReplayTransaction question

Mathias Gibbens <[email protected]>
Newsgroups gmane.comp.python.egenix.user
Message-ID <1249910800.16448.14.camel@linux6521>
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.)

Thanks,
Mathias Gibbens


_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.