[Zope] Zope 2.7.0 and custom_zodb.py

Chris Withers chris at simplistix.co.uk
Wed Jun 2 03:40:09 EDT 2004


John E. Barham wrote:

> I'm running 2.7.0 on Linux (Mandrake) with Python 2.3.4.
> 
> I wanted to bump up the database connection pool limit so put the following
> custom_zodb.py in the instance home:

custom_zodb.py shouldn't be used in 2.7.0 AFAIK...

> import os
> import ZODB.FileStorage
> import ZODB.DB
> 
> filename = os.path.join(INSTANCE_HOME, 'var', 'Data.fs')
> Storage = ZODB.FileStorage.FileStorage(filename)
> DB = ZODB.DB(Storage, pool_size=20, cache_size=2000)

Look at zope.conf in the /etc directory of your instance. Check out the ZODB 
section and see if there's a key that will do what you want.

Also bear in mind that changing the pool size on it's own doesn't really do 
much. You need to bump up the number of Zope threads running, otherwise all you 
have is unused database connections lying about ;-)

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the Zope mailing list