Re: Closing idle connections

From: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
To: Steve Lane <slane(at)fmpro(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Closing idle connections
Date: 2002-03-15 01:22:14
Message-ID: 20020314171836.A39420-100000@teak.adhesivemedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Not the most ideal solution, but you can set MaxRequestsPerChild to
soem value (several thousand or so). By doing that apache will kill of
that child process which will close any db connections it is using. That
should keep the number down... or play around with Min/Max Servers so
that during idle times apache kills off it's children...

-philip

On Thu, 14 Mar 2002, Steve Lane wrote:

> Can someone tell me the easiest way to have the postmaster shut down idle
> connections after some period of time? Or is this even the right way to
> think about it?
>
> I'm using Postgres as a back end with PHP/Apache in the middle. The server
> keeps bogging down because apache doesn't seem to reuse old processes with
> their connections very well -- the number of open connections keeps growing
> until postmaster refuses any new ones.
>
> Do I just need a way of shutting down the idle connections? Or is there
> something else I'm missing?
>
> -- sgl
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave 2002-03-15 01:59:22 pg_hba.conf
Previous Message Steve Lane 2002-03-15 00:38:56 Closing idle connections