[Zope3-Users] InvalidObjectReference error

Marius Gedminas mgedmin at b4net.lt
Tue Jan 22 20:49:07 EST 2008


On Mon, Jan 21, 2008 at 11:32:13AM +0100, Frank Burkhardt wrote:
> my zope 3 server contains a modified principal folder which is updated
> on a regular basis via XMLRPC. This usually works fine but after some days, the
> update process makes the zope server raise this error:
> 
>  InvalidObjectReference: Attempt to store a reference to an object from a separate connection to the same database or multidatabase
> 
> Restarting the server fixes the problem for some days.
> 
> I'm quite sure, this is some bug in my update code but I don't really know,
> what I've to look for. Does anyone have an idea?

I suspect you're abusing global variables.  Zope has one ZODB connection
per thread.  Somehow an object loaded/stored in one thread is being
referenced from a different thread.  The most common way to pass data
between threads is to use globals (or accidental shared state, e.g.
class attributes, or mutable default method arguments).

Marius Gedminas
-- 
Westheimer's Discovery:
        A couple of months in the laboratory can
        frequently save a couple of hours in the library.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20080123/aa55d462/attachment.bin


More information about the Zope3-users mailing list