Recently my website has some exceptions.MemoryError, which causes Zope to restart itself. It is usually not transparent to users, but sometimes it raises an exception on restart, which prevents Zope from loading the whole mxmCounter product. This causes attribute error in pages where the template calls mxmCounter. Is there any way to make this product more robust, so as to resist these unexpected restarts?
Thx> yo @@@ jaroli.de
2004-07-26T09:33:51 ERROR(200) Zope Could not import Products.mxmCounter
Traceback (most recent call last):
File "/usr/local/Zope-2.7.0/lib/python/OFS/Application.py", line 654, in import_product
product=__import__(pname, global_dict, global_dict, silly)
File "/usr/local/fenntarthato.hu/Products/mxmCounter/__init__.py", line 1, in ?
import mxmCounter
File "/usr/local/fenntarthato.hu/Products/mxmCounter/mxmCounter.py", line 52, in ?
counters = get_from_file()
File "/usr/local/fenntarthato.hu/Products/mxmCounter/mxmCounter.py", line 43, in get_from_file
c = cPickle.load(f)
EOFError
Yes... but
Posted bymaxmat
2004-09-23 11:08 AM
If zope crashes while the counter is writing to it's file, there is really nothing that anyone can do. But I will look into making the loading of the file a bit more robust.
To get rid of the problem you should manually delete your counters dict in the var directory. But that will loos you all your hits.
Thx> yo @@@ jaroli.de
2004-07-26T09:33:51 ERROR(200) Zope Could not import Products.mxmCounter
Traceback (most recent call last):
File "/usr/local/Zope-2.7.0/lib/python/OFS/Application.py", line 654, in import_product
product=__import__(pname, global_dict, global_dict, silly)
File "/usr/local/fenntarthato.hu/Products/mxmCounter/__init__.py", line 1, in ?
import mxmCounter
File "/usr/local/fenntarthato.hu/Products/mxmCounter/mxmCounter.py", line 52, in ?
counters = get_from_file()
File "/usr/local/fenntarthato.hu/Products/mxmCounter/mxmCounter.py", line 43, in get_from_file
c = cPickle.load(f)
EOFError
To get rid of the problem you should manually delete your counters dict in the var directory. But that will loos you all your hits.