[Zope-dev] Re: [ZODB-Dev] Re: BTrees strangeness (was Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

Michael Dunstan michael at looma.co.nz
Tue May 18 19:24:24 EDT 2004


On 18/05/2004, at 10:03 PM, Andrea Patuzzo wrote:

> Hi, dear developers:
>
> We are now randomly getting this kind of error:
>
> [...]
>   File 
> "/usr/local/Zope270CVS/lib/python/Products/Transience/Transience.py",
> line 341, in __setitem__
>     current_bucket = self._data[current_ts]
> KeyError: 1084872640
> ====
>
> This one was with the latest publish.py / startup.py patch and the new
> Transience.py implementation, on a yesterday's Zope-2_7-branch 
> checkout.
> New Zope instance with FileStorage does not solve the problem.
> Same happens with the patches applied to the official Zope-2.7.0 
> release.
>
> Note: once the error happens, zope has to be restarted to function 
> again.
> Before applying patches we were getting "get" errors (instead of
> "__setitem__") and we just had to close browser to get back to work.
> Here we have to restart Zope (with TemporaryStorage) or delete 
> Sessions.fs
> and restart (with FileStorage).

My guess at the moment is that somewhere a ConflictError is being 
swallowed. There are a few things that can be responsible for this:

- Use of hasattr on Persistent objects.

- try/except blocks that don't raise ConflictErrors.

 From your trace that looks like a Plone site. A very quick glance 
through Plone and its friends indicates that there may be some chance 
of either of the above causing some problems. Although Plone 2.0.1 
includes the following fix:

     - Fixed bare 'except:' statements in Plone so we don't swallow
       ZODB ConflictErrors. Mostly by adding 'except ConflictError: 
raise'.
       [stefan]

Someone please shoot me down and claim that Plone and friends all do 
the right thing. ;-)

Michael




More information about the Zope-Dev mailing list