Thread: Backends staying around

Backends staying around

From
"Raymond O'Donnell"
Date:
Hi all,

How long are backends supposed to hang around after a query is
executed? We're running into trouble because they're not going
away - this evening there were the full default complement of 32
sitting there, and the machine was refusing any more connections.
I've increased -N to 64 and -B to 128 after reading the FAQ, but
obvously I'd prefer if they quietly died after handling requests.

We are running Postgres 7.0.2, accessed from an NT4 server via
ADO 2.5 from IIS 4 (how's that for a mouthful of acronyms...?).

Many thanks.

--Ray O'Donnell


---------------------------------------------------------
Raymond O'Donnell            http://www.iol.ie/~rod/organ
rod@iol.ie                      The Irish Pipe Organ Page
---------------------------------------------------------

Re: Backends staying around

From
Martijn van Oosterhout
Date:
On Tue, Dec 04, 2001 at 12:15:33PM -0000, Raymond O'Donnell wrote:
> Hi all,
>
> How long are backends supposed to hang around after a query is
> executed? We're running into trouble because they're not going
> away - this evening there were the full default complement of 32
> sitting there, and the machine was refusing any more connections.
> I've increased -N to 64 and -B to 128 after reading the FAQ, but
> obvously I'd prefer if they quietly died after handling requests.

Well, the backends die when the client closes the connection. Perhaps you
should check on the number of open TCP connections to the backend and find
the process that is neglecting to close it's connection.

> We are running Postgres 7.0.2, accessed from an NT4 server via
> ADO 2.5 from IIS 4 (how's that for a mouthful of acronyms...?).

Maybe you have some form of persistant connections? At least in unix, a
socket is closed automatically when all processes owning the endpoint die
off or close it.

HTH,
--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> Terrorists can only take my life. Only my government can take my freedom.

Re: Backends staying around

From
"Raymond O'Donnell"
Date:
On 5 Dec 2001, at 0:00, Martijn van Oosterhout wrote:

> Maybe you have some form of persistant connections? At least in unix,
> a socket is closed automatically when all processes owning the
> endpoint die off or close it.

Thanks for your reply! I have connection pooling turned on in ODBC
on the NT machine, but this is supposed to let clients re-use the
connections, so in theory at least the number of backends
shouldn't rise beyond a certain level - IIS always uses the same
username/password to connect to the database, so connection
pooling ought to be pretty efficient. I'll double-check how the
connections are handled in the COM components called from IIS.

--Ray.


---------------------------------------------------------
Raymond O'Donnell            http://www.iol.ie/~rod/organ
rod@iol.ie                      The Irish Pipe Organ Page
---------------------------------------------------------