[ZODB-Dev] RE: finding POSKeyErrors
Tim Peters
tim at zope.com
Wed Nov 10 10:59:05 EST 2004
[Tim Peters]
>> ...
>> It's the purpose of fsrefs to find references to missing objects.
[Gerry Kirk]
> These objects are based on CMF and Archetypes, content objects. fsrefs.py
> doesn't find problems, but I tried once updating all objects of a certain
> type, and I got POSKeyErrors trying to access some of them. That's why
> I'd like to go through the whole system, in case there are others like
> that.
The purpose of fsrefs is (see above <wink>). It does go through the entire
database, and checks the current revision of *every* non-versioned object.
It doesn't matter what the objects are based on. I can't guess whether
you're using versioned data (but guessed last time that you weren't), or
whether you use undo in such a way as to provoke access to non-current
revisions of non-versioned data. fsrefs doesn't check either of those (and
neither does any other tool).
> Then this morning I came into the office to find a lovely POSKeyError on
> the home page of the site:
If fsrefs gave a clean report, then you know that the POSKeyError was not
due to a missing current revision of a non-versioned object in the database
at the time fsrefs ran. Continuing to stare at the database is therefore
unlikely to do you any good.
I don't know what is at fault, but you've pretty well established that the
database is not.
> 2004-11-10T08:37:43 ERROR(200) ZODB Couldn't load state for
> 00000000001cb29b Traceback (most recent call last):
> File "/usr/local/Zope/Zope2.7.2/lib/python/ZODB/Connection.py", line
> 559, in setstate
> p, serial = self._storage.load(oid, self._version)
> File "/usr/local/Zope/Zope2.7.2/lib/python/ZEO/ClientStorage.py",
> line 749, in load
> p, s, v, pv, sv = self._server.zeoLoad(oid)
> File "/usr/local/Zope/Zope2.7.2/lib/python/ZEO/ServerStub.py", line
> 82, in zeoLoad
> return self.rpc.call('zeoLoad', oid)
> File "/usr/local/Zope/Zope2.7.2/lib/python/ZEO/zrpc/connection.py",
> line 372, in call
> raise inst # error raised by server
> POSKeyError: 00000000001cb29b
>
> I fixed the problem by removing the two zeo client cache files.
For example, do you know that 2.7.2 Zope can create POSKeyErrors "out of
thin air"? See ZODB news for ZODB 3.2.4 release candidate 1:
http://zope.org/Products/ZODB3.2/NEWS
and collector issue 789.
ZODB 3.2.4, and corresponding fixes to Zope, were released in Zope 2.7.3.
Other people with "mystery POSKeyError" complaints said they went away when
moving to 2.7.3. Give it a try!
BTW, if fstest and fsrefs have no complaints, there's no reason to avoid
packing.
More information about the ZODB-Dev
mailing list