在relstorage zodb打包时出现“Unhandled exception in thread started by Error in sys.excepthook”
我们有一个相对较大的Plone实例,它运行在自己的挂载点上。ZMI界面显示数据库的大小为7101.4M。我们每周使用Relstorage的zodbpack.py脚本对数据库进行打包,删除超过7天的对象。在过去的两周里,定时任务运行打包时输出了以下内容:
Sun Jun 26 07:00:38 BST 2011 packing cms mount
/home/zope/home/parts/zope2/lib/python/zope/configuration/xmlconfig.py:323: DeprecationWarning: zope.app.annotation has moved to zope.annotation. Import of zope.app.annotation will become unsupported in Zope 3.5
__import__(arguments[0])
/home/zope/home/eggs/p4a.common-1.0.7-py2.4.egg/p4a/common/configure.zcml:19: DeprecationWarning: The five:localsite directive is deprecated and will be removed in Zope 2.12.
See Five/doc/localsite.txt .
<five:localsite class=".Portal.PloneSite" />
/home/zope/home/parts/zope2/lib/python/zope/configuration/fields.py:417: UserWarning: You did not specify an i18n translation domain for the 'description' field in /home/zope/home/eggs/Products.CMFSquidTool-1.5.1-py2.4.egg/Products/CMFSquidTool/configure.zcml
warnings.warn(
/home/zope/home/parts/zope2/lib/python/zope/configuration/fields.py:417: UserWarning: You did not specify an i18n translation domain for the 'title' field in /home/zope/home/eggs/Products.CMFSquidTool-1.5.1-py2.4.egg/Products/CMFSquidTool/configure.zcml
warnings.warn(
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
Sun Jun 26 09:56:31 BST 2011 finished pack
第一行和最后一行是定时任务运行的脚本输出的内容。
打包后数据库的大小确实减少了,所以看起来它是在做一些事情。不过,我有点不知道该如何进一步调试这个错误。
之前打包运行得很好。后来我们更改了数据库的连接参数,但忘记在定时任务中更新这些参数,因此打包任务有11周没有运行。在出现这个错误之前,它成功运行了两次——难道长时间没有打包运行会和这个错误有关吗?
任何帮助都将非常感激。
我们正在运行:
- Plone 3.3.5
- Zope 2.10.11
- Relstorage 1.4.1
- ZODB 3.8.4-polling
1 个回答
1
这个错误跟Python有关,不是RelStorage的问题。你可以查看这个链接 http://bugs.python.org/issue1722344,里面有我认为相关的bug报告。这个bug适用于Python 2.5和2.6,但可能也适用于Python 2.4。如果你还在用Python 2.4,建议升级到最新版本。
不过在这种情况下,这条消息其实没什么大不了的。打包操作只用一个线程,而且如果打包成功,你会在最后看到成功的消息(比如 Sun Jun 26 09:56:31 BST 2011 finished pack
只有在打包成功时才会显示)。
你也可以尝试升级到RelStorage 1.5.0(这个版本上周刚发布);这个版本在处理大型数据库和繁忙网站时,打包功能有了显著改善。