[Zope3-Users] ConnectionStateError when a worker thread finishes

Shailesh Kumar shaileshk at gmail.com
Tue Jan 9 01:59:48 EST 2007

Thanx for the guidance.

I did figure out that the whole problem was happening because of threads
trying to access the ZODB. For the time being, I got rid of that, and had a
separate sheduler event which queries the background threads to get update
information and put it in the ZODB. It seems to work well.

With regards,

On 1/8/07, Stephan Richter <srichter at cosmos.phy.tufts.edu> wrote:
> On Wednesday 03 January 2007 05:46, Shailesh Kumar wrote:
> > In my application, some background threads are being created. But when a
> > thread finishes up its work, a strange exception is thrown:
> > The callstack doesn't show any part of my application code.
> You have to use threads very carefully, if they modify the database. The
> correct way is to create a new connection to the ZODB do your work, commit
> the transaction and close the connection. Pretty much copy what the
> publisher
> does. Another alternative is to create a new publisher request of course.
> Regards,
> Stephan
> --
> Stephan Richter
> CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
> Web2k - Web Software Design, Development and Training
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20070109/289fe008/attachment.htm

More information about the Zope3-users mailing list