Re: Timeout for a spinning ZPsycopgDA

"Marco Bizzarri" <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On Mon, Sep 22, 2008 at 3:05 PM, Nico Grubert <[email protected]> wrote:

> 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
> _______________________________________________
> Psycopg mailing list
> Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
> http://lists.initd.org/mailman/listinfo/psycopg
>


Ciao, Nico.

Please, take a look at my post about migrating from psycopg1 to psycopg2.
The huge amount of hanging connections could be caused by an heavily loaded
Zope server.

Please check also my post on Zope mailing list about __setstate__

Regards
Marco

_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/psycopg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.