[Zope] Re: Zope hangs when database takes too long to respond

Jonathan dev101 at magma.ca
Wed Sep 6 17:30:30 EDT 2006


----- Original Message ----- 
From: "Tres Seaver" <tseaver at palladion.com>
To: <zope at zope.org>
Sent: Wednesday, September 06, 2006 5:16 PM
Subject: [Zope] Re: Zope hangs when database takes too long to respond


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Sinang, Danny wrote:
>> Sorry for the typo error. 
>>  
>> The subject should read "hangs", not "hands" .
>> 
>> ________________________________
>> 
>> From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On Behalf Of
>> Sinang, Danny
>> Sent: Wednesday, September 06, 2006 10:56 PM
>> To: zope at zope.org
>> Subject: [Zope] Zope hands when database takes too long to respond
>> 
>> 
>> Hello,
>>  
>> We wrote an application (on Zope v2.7.6-final) that queries a MySQL
>> database via ZMySQLDA v2.0.8.
>>  
>> Whenever the MySQL server experiences heavy load, Zope seems to hang,
>> such that we can't even access the ZMI.
>>  
>> Is this a bug in version 2.7.6 or ZMySQLDA ?
> 
> It is a "known" limitation of Zope, which has a set number of "worker
> threads" available to service user requests.  If a worker thread blocks
> (e.g., waiting for MySQL), it is not able to do any work for other
> pending requests.
> 
> You can tweak the number of threads in your zope.conf file, via the
> 'zserver-threads' directive (the default value is 4).  If you do
> increase this value, you also need to increase the number of database
> connections avialble (via 'pool-size') which will increase the RAM
> required by your appserver.
> 
>> Or are there some settings I can tweak to adjust some database
>> connection timeout value ?
> 
> Not that I know of.
> 


Another possible solution is to have a look at twisted:

http://twistedmatrix.com/projects/core/documentation/howto/faq.html


Jonathan





More information about the Zope mailing list