[Zope-DB] ZPsycopgDA Connections and Refreshed Zope Products
Sat, 22 Mar 2003 22:20:59 +0100
Federico Sevilla III wrote at 2003-3-22 10:58 +0800:
> To verify, I restarted Zope, effectively closing all connections to
> PostgreSQL. Then I accessed the instance of my product, initating a
> connection. I did a number of other stuff, and still there was exactly
> one connection. Then I updated the timestamp of a file in my product's
> source directory, recompiled the .pyc and .pyo files, and refreshed my
> product. The next access to an instance of my product created a new
> connection to the PostgreSQL database.
Usually, Zope's DA instances open a connection as soon they
are loaded into memory (from ZODB). When the instance is flushed
from cache, the connection should be closed again.
The ZODB maintains a pool of connections, each with its
own private cache. Each cache can hold a (copy of) the DA instance,
each with its database connection.
The default number of connections is 7 although the number
of threads is an upper bound if it is smaller.