[ZODB-Dev] Cache Query (why doesn't RAM usage ever drop?)

Shane Hathaway shane@zope.com
Mon, 28 Oct 2002 12:47:05 -0500


Chris Withers wrote:
> Shane Hathaway wrote:
>> We left 4 threads running, the default.  I can't think of any bad 
>> effects of having more threads than database connections other than a 
>> little memory waste and a potential deadlock if the application uses 
>> Zope.app(), which neither Zope nor our application does.
> 
> 
> hehe, you'll never guess what my setup uses ;-)
> 
> How is Zope.app() usage detrimental?

It tries to open a new connection to the database even though a 
connection is already open.  If two threads try to call Zope.app() at 
the same time and your pool size is 2, your server will deadlock.  This 
is not a bug.  If you use Zope.app(), your pool size must be at least 
one more than the number of threads.  The default pool size of 7 is plenty.

Shane