Re: Safe to kill idle connections?

From: Thomas Beutin <tb(at)laokoon(dot)in-berlin(dot)de>
To: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Safe to kill idle connections?
Date: 2005-10-17 06:40:20
Message-ID: 43534754.8050402@laokoon.in-berlin.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Francisco Reyes wrote:
> Ever since I installed a particular program, PHPWiki, I am seeing idle
> postgres sessions.. even days old. Is it safe to delete them?
I wouln't do that. These seems to be php persistent connections, and
they are idle for the moment but reused for new wiki requests.
http://www.php.net/pg_pconnect

> For example:
> postmaster: wiki simplicato_wiki [local] idle (postgres)
>
> Ultimately I will either switch wiki or take the time and find the piece
> of code that is causing the sessions to remain open, but until then
> don't want to leave those idle sessions around.. for days.
If there is no configuration switch, search for pg_pconnect in the code
and replace it with pg_connect, but if You're running a site with heavy
traffic i recommend to use the persistent connections for performance
reasons.

Cheers,
-tb
--
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sri 2005-10-17 07:10:01 Problem using start transaction in nested transactions.
Previous Message Devrim GUNDUZ 2005-10-17 05:09:36 Re: Anybody using PostGIS?