From: scott.marlowe <scott.marlowe@ihs.com>
To: Andy Dunlop <andy@infocus.co.za>
Cc: pgsql-php@postgresql.org
Subject: Re: Too many clients
Date: Fri, 27 Feb 2004 14:46:57 -0700 (MST)
Message-ID: <Pine.LNX.4.33.0402271444210.15282-100000@css120.ihs.com> (raw)
In-Reply-To: <1077877268.1247.9.camel@redhat1.localdomain>
On 27 Feb 2004, Andy Dunlop wrote:
> I hope this goes to the right place!
>
> I occasionally get the error "too many clients" when connecting to the
> database. I try restarting the Postgres server and also Apache, but the
> only thing that clears the problem is restarting Linux. I have maxusers
> set to 35, and I am the only user, so I suspect I am not doing something
> in my scripts that I should be, or doing something that I shouldn't be!
> I have the pg_connect at the top of the script so each time it loads the
> page it does a new connect - maybe this is a problem?
1: Make sure you're not using pg_pconnect, but this doesn't sound like
that's the problem. Just making sure.
2: It sounds like php may be crashing at some point it its execution. Do
you have a log of its output when it's running? I've seen issues where if
you compile apache against one set of libs and php against another, then
apache/php starts having children crash and doesn't close the connections.
It takes a certain amount of time for the timeout to hit on the TCP/IP
layer and for the pg backend to close.
Are you sure you're actually closing down postgresql all the way when you
say you tried restarting the postgresql server? It could be that it's not
shutting all the way down. What does 'ps ax|grep post' say?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: scott.marlowe@ihs.com, andy@infocus.co.za
Subject: Re: Too many clients
In-Reply-To: <Pine.LNX.4.33.0402271444210.15282-100000@css120.ihs.com>
References: <1077877268.1247.9.camel@redhat1.localdomain> <Pine.LNX.4.33.0402271444210.15282-100000@css120.ihs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox