[Zope] Zope-2.6 + PostgreSQL-7.2.1 + ZPsycopgDA

Thierry Florac thierry.florac@onf.fr
20 Dec 2002 12:30:36 +0100


  Hi,

I currently use the products described in the title on a Linux server.

My problem is that as the site is used (even by a little number of
users), more and more connections are opened on the PostgreSQL server.
But these connections are not released, even if many of them don't seem
to be reused, and after a while PostgreSQL refuse new connections saying
that too many connections are already open.

Is there any way to handle such a kind of problems in Zope, to reuse or
close existing connections when no more used, or is it only a PostgreSQL
problem ???

Many thanks for your help,

  Thierry


P.S.: actually, my SQL methods are defined into my own Zope products
like this :

  sql_get_something = SQL (id='sql_get_something', title="My Title",
                           connection_id='my_sql_connection',
                           arguments='',
                           template="select * from table")

Then this method is used normally into DTML scripts (<dtml-in
sql_get_something>) or into other Python methods (for record in
sql_get_something(): ...)
Only the 'my_sql_connection' component is a ZPsycoPGDA instance defined
into my Zope site throught ZMI, but there is never any explicit handling
of database connections...

-- 
  Linux every day, keeps Dr Watson away...
  http://gpc.sourceforge.net -- http://www.ulthar.net