Zope:ZMySQLDA OperationalError:(2006年,“ MySQL服务器已消失”)

时间:2019-02-24 10:19:33

标签: python mysql mysql-python zope

我运行的是2008年以来非常老的Zope应用程序,崩溃后我不得不在新服务器上重新安装该应用程序。我已经很难重新安装这些旧的Zope模块,终于重新工作了。但是,我经常遇到以下错误,该错误似乎与模块ZMySQLDA有关:

Traceback (innermost last):

Module ZPublisher.Publish, line 249, in publish_module_standard
Module ZPublisher.Publish, line 194, in publish
Module Zope2.App.startup, line 304, in abort
Module transaction._manager, line 92, in abort
Module transaction._transaction, line 503, in abort
Module Shared.DC.ZRDB.TM, line 64, in abort
Module Products.ZMySQLDA.db, line 634, in _abort
Module Products.ZMySQLDA.db, line 520, in _query
OperationalError: (2006, 'MySQL server has gone away')

zope日志中的错误:

2019-02-24T11:01:20 WARNING ZMySQLDA query failed: ROLLBACK

2019-02-24T11:01:20 ERROR txn.139701499614976 Failed to abort resource 
manager: <Products.ZMySQLDA.db.DB instance at 0x7f0ec950e440>
Traceback (most recent call last):
File 
"/***/***/.pyenv/versions/2.7.12/envs/my_zope2/lib/python2.7/site-packages/transaction-1.1.1-py2.7.egg/transaction/_transaction.py", line 503, in abort
rm.abort(self)
File 
"/***/***/.pyenv/versions/2.7.12/envs/my_zope2/lib/python2.7/site-packages/Products.ZSQLMethods-2.13.4-py2.7.egg/Shared/DC/ZRDB/TM.py", line 64, in abort
try: self._abort()
File  "/***/**/.pyenv/versions/2.7.12/envs/my_zope2/lib/python2.7/site-packages/Products.ZMySQLDA-3.1.1-py2.7.egg/Products/ZMySQLDA/db.py", line 634, in _abort
self._query("ROLLBACK")
File 
"/***/***/.pyenv/versions/2.7.12/envs/my_zope2/lib/python2.7/site-packages/Products.ZMySQLDA-3.1.1-py2.7.egg/Products/ZMySQLDA/db.py", line 520, in _query
self.db.query(query)
OperationalError: (2006, 'MySQL server has gone away')

2019-02-24T11:01:21 ERROR ZMySQLDA exception during _begin
Traceback (most recent call last):
File 
"/***/***/.pyenv/versions/2.7.12/envs/my_zope2/lib/python2.7/site-packages/Products.ZMySQLDA-3.1.1-py2.7.egg/Products/ZMySQLDA/db.py", line 601, in _begin
self.db.ping()
OperationalError: (2006, 'MySQL server has gone away')

我已经检查了MySQL中的max_package和timeout变量并增加了它们。 MySQL日志中没有错误。因此,该错误最初似乎与MySQL没有关系。其他有关stackoverflow的文章中提出的解决方案无法解决此问题。

我可能不应该再运行这个过时的应用程序,但是它仍然非常重要,不能轻易替换。任何帮助将不胜感激。

0 个答案:

没有答案