[Zope] Zope 2.7.0 and custom_zodb.py

John E. Barham john_e_barham at hotmail.com
Fri Jun 4 14:36:45 EDT 2004


Chris Withers wrote:

> John E. Barham wrote:
> > Relational database connections are distributed from the general
database
> > connection pool.  See:
> > http://www.zope.org/Members/petrilli/ZSQLFAQ
>
> That article is old, unclear and misleading.

Perhaps the original email from Jim Fulton on which the article is based is
clearer:
http://mail.zope.org/pipermail/zope/2000-January/101673.html
It might be more than four years old but reading the Zope source code
confirms that the default connection pool size is still 7.

> > Elsewhere it's recommended that the database connection pool size be
larger
> > than the thread pool size.
>
> Where and why?

The Zope Book (2.6 Edition), chapter 24 (Maintaining Zope):

"""The "pool_size" parameter is the number of database connections. Note
that the number of database connections should always be higher than the
number of ZServer threads by a few (it doesn't make sense to have fewer
database connections than threads)."""

And Zope itself follows this recommendation in that the default database
connection pool size is 7 but the default thread pool size is only 4.

> Just occurred to me that you may be misunderstanding what a "database
> connection" is, since the zope terminology is horribly confused.
>
> The "SQL Connection" object you add through the ZMI is NOT a database
> connection, either relational or ZODB, and the number of those objects has
> nothing to do with the zodb pool size and not much to do with the number
of
> connections from Zope to your relational database.

I realize that although the terminology is admittedly confusing.  Even if
one were to create multiple database "connection" objects to the same
relational database, I don't see how that would help since a Z SQL Method
can only be associated w/ one database connection.

> BTW, what relational database and what database adapter are you using?

PostgreSQL and psycopg on Linux.

    John



More information about the Zope mailing list