3 of 4 Zope threads hanging - how to find culprit?
Hello, I am experiencing 3 of 4 of Zopes threads hanging and only being released by restarting Zope. The threads have been hanging up to more than 78 000 seconds before we restarted the application. We use DCOracle2 all the time, several SQL-queries for each request. Due to the natuerw of the underlying SQL the response from the database can tale up to 15 seconds to complete, and requests get stacked waiting for the repsonse from the database server. 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. Zope 2-5-1, RedHat 7.2 DCO2 is not the latest release, but from somwhere this summer (fromCVS). Thanks, /dario - -------------------------------------------------------------------- Dario Lopez-Kästen, IT Systems & Services Chalmers University of Tech.
Dario Lopez-Kästen 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.
Hey Dario, for what it's worth I have a few changes in CVS which does add explicit close() operators to DCOracle2. This *probably* won't help your 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 threads and ZODB connections. The -t option to Zope's z2.py will increase the number of threads, but you may find you need to increase the number of ZODB connections as well. The cheeseball way of increasing the number of ZODB threads is to edit lib/python/ZODB/DB.py and increase the pool_size parameter of the __init__ method of the DB class up from 7. The better way to do it is to provide your own custom_zodb.py file which opens its own DB object with a different number of threads.
Matthew T. Kromer wrote:
__init__ method of the DB class up from 7. The better way to do it is to provide your own custom_zodb.py file which opens its own DB object with a different number of threads.
DBTab rox ;-) Chris
participants (3)
-
Chris Withers -
Dario Lopez-Kästen -
Matthew T. Kromer