Three questions: No response in Mozilla, VersionLockErrors, and transactions in Postgres with ZPoPyDA
Hi all, Right now I'm running Zope in single-threaded mode, just to forstall any questions of that nature. Also: Zope 2.3.3 binary on RedHat 6.2, PostgreSQL 7.1, PoPy 2.0.2, ZPoPyDA 1.2, exUserFolder 0.5.0 Question 1: There is something very odd with Postgres and transactions. I will very often find a postgres process in the list with "idle in transaction". Typically when that happens, I can check the logs and discover that a commit has not been performed, and database information will not be written. One time while the site was idle, I couldn't add an index without shutting the Zope process down as it had a transaction open. When this happens, I can sometimes run a ZSQL method with only the word "commit;" in it to unstick everything. Question 2: Whenever I use the version feature, working in a version will eventually cause my users to get a VersionLockError just viewing the site. Typically I'll see exUserFolder mentioned in the error: <!-- Traceback (innermost last): File /usr/local/dev/zope/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /usr/local/dev/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/dev/zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/dev/zope/lib/python/ZPublisher/Publish.py, line 175, in publish File /usr/local/dev/zope/lib/python/Zope/__init__.py, line 235, in commit File /usr/local/dev/zope/lib/python/ZODB/Transaction.py, line 300, in commit File /usr/local/dev/zope/lib/python/ZODB/Connection.py, line 377, in commit (Info: (('Products.exUserFolder.pgPropSource.pgPropSource', 'pgPropSource'), '\000\000\000\000\000\000\033\214', '')) File /usr/local/dev/zope/lib/python/ZODB/FileStorage.py, line 663, in store (Object: /usr/local/dev/zope/var/Data.fs) VersionLockError: (see above) Question 3: Mozilla (20010612) goes off into la-la land occasionally with my ZOPE site. I can hit a link, Mozilla will sit there churning forever, and while Mozilla is churning I can go into Netscape and pick the same link, getting the page immediately. Any ideas, or take this up with the Mozilla team? Thanks in advance for any information/help you may have, -scott anderson
Scott Anderson writes:
Right now I'm running Zope in single-threaded mode, just to forstall any questions of that nature.
Also: Zope 2.3.3 binary on RedHat 6.2, PostgreSQL 7.1, PoPy 2.0.2, ZPoPyDA 1.2, exUserFolder 0.5.0
Question 1:
There is something very odd with Postgres and transactions. I will very often find a postgres process in the list with "idle in transaction". Typically when that happens, I can check the logs and discover that a commit has not been performed, and database information will not be written. One time while the site was idle, I couldn't add an index without shutting the Zope process down as it had a transaction open. When this happens, I can sometimes run a ZSQL method with only the word "commit;" in it to unstick everything. About two to 4 months ago, someone posted a question (I think to "zope-dev") about dubious code in Zope's transaction management that could lead to dangling transactions.
Jim Fulton replied that the poster was unfortunately right. I would have expected that the problem were fixed in the latest Zope release. Maybe, it is not.... Search the (searchable) mailing list archives (at NIP) and check whether the dubious code is still there.
Question 2:
Whenever I use the version feature, working in a version will eventually cause my users to get a VersionLockError just viewing the site. Typically I'll see exUserFolder mentioned in the error: ... commit (Info: (('Products.exUserFolder.pgPropSource.pgPropSource', 'pgPropSource'), '\000\000\000\000\000\000\033\214', '')) File /usr/local/dev/zope/lib/python/ZODB/FileStorage.py, line 663, in store (Object: /usr/local/dev/zope/var/Data.fs) VersionLockError: (see above) I appears that something performs writes although you expect it to read only.
The exception value should tell you the "oid" and the version that is looking the object (the latter is not interesting). To narrow down what object is written unexpectedly, you can load the object from ZODB (e.g. via the Zope monitor or directly from a Python script (external, not Zope's; Zope need to be stopped): import Zope import GLOBALS conn= GLOBALS.DB.open() obj= conn[oid] You can then analyse "obj", e.g. determine its class: "obj.__class__". Dieter
participants (2)
-
Dieter Maurer -
Scott Anderson