Re: Disconnect sessions and session timeouts

From: Ian Harding <harding(dot)ian(at)gmail(dot)com>
To: Len Walter <len(dot)walter(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Disconnect sessions and session timeouts
Date: 2005-08-01 17:37:00
Message-ID: 7256023005080110377af9bc13@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Can the client application be modified? It seems like it might need to be,
since if it is expecting its connection to be open whenever it's running,
the server killing the connection might lead it to crash.

- Ian

On 8/1/05, Len Walter <len(dot)walter(at)gmail(dot)com> wrote:
>
> Hi,
>
> I'm looking to solve a problem where a client application is leaving
> idle sessions open, eventually filling up the maximum connections and
> stopping anyone from connecting.
>
> It seems like there's no way to disconnect sessions after a given idle
> timeout. There is a statement timeout, but that won't terminate the
> session.
>
> Is there any way to disconnect a given session? In oracle you'd do
> something like "alter system kill session 'sid,serial#'". I've tried
> parsing the output of ps -efa to find out which postgres processes
> below to clients that should be disconnected, then sending them TERM
> or QUIT signals, but TERM has no effect and QUIT puts the whole
> database into recovery mode.
>
> Thanks in advance,
> Len
>
> --
> Len Walter len(dot)walter(at)gmail(dot)com http://crookedtimbre.net
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2005-08-01 17:52:51 Re: PostgreSQL vs. MySQL
Previous Message Chris Travers 2005-08-01 17:29:02 Re: New MySQL to PostgreSQL Migration Guide