[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope3-users
Subject:    Re: [Zope3-Users] InvalidObjectReference error
From:       Marius Gedminas <mgedmin () b4net ! lt>
Date:       2008-01-23 1:49:07
Message-ID: 20080123014907.GE4410 () platonas
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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.


["signature.asc" (application/pgp-signature)]

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic