Timeout for a spinning ZPsycopgDA
Nico Grubert <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi there this weekend I had a problem with a spinning Zope caused by hanging postgres (too many connections) database. This is my setup: - Zope Server (Zope 2.10.5) - Python 2.4.4 - psycopg 2.0.5.1 - remote database server with PostgreSQL 8.2.6 installed The problem was: On the remote remote database server there were too many connections open (> 300). The ps -ax command told me there were > 300 entries of: postgres: postgres intranetdb <IP_ADDRESS>(36635) idle I could ping the remote database server but connecting to any postgres database failed. I could not login in the Zope Root Folder where my ZPsycopgDA objects live. These ZPsycopgDA objects connect to the remote server and I guess the Zope was hanging because the ZPsycopgDA objects could not connect to the hanging database server. This also made the whole Zope site hanging. My question is: Can I set any timeout in the ZPsycopgDA so the Zope site won't hang for hours? Thanks in advance Nico