[Zope] 3 of 4 Zope threads hanging - how to find culprit?

Matthew T. Kromer matt@zope.com
Wed, 26 Feb 2003 10:40:35 -0500


Dario Lopez-K=E4sten wrote:

>This leads to the situation that only 1 Zope-thread responds to requests.
>There is no difference in the queries executed by each thread.
>
>Any advice in how to prevent threads from locking up is appreciated, as =
well
>as advice on how to find out why the threads lockup.
>
> =20
>
Hey Dario,

for what it's worth I have a few changes in CVS which does add explicit=20
close() operators to DCOracle2.  This *probably* won't help your=20
situation because Zope doesn't call close() on the DA connections.

However, what might help you a lot more is to bump up the number of=20
threads and ZODB connections.  The -t option to Zope's z2.py will=20
increase the number of threads, but you may find you need to increase=20
the number of ZODB connections as well. =20

The cheeseball way of increasing the number of ZODB threads is to edit=20
lib/python/ZODB/DB.py and increase the pool_size parameter of the=20
__init__ method of the DB class up from 7.  The better way to do it is=20
to provide your own custom_zodb.py file which opens its own DB object=20
with a different number of threads.