Skip site navigation (1) Skip section navigation (2)

Connections don't time out.

From: "Rainer Mager" <rmager(at)vgkk(dot)co(dot)jp>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Connections don't time out.
Date: 2000-03-09 03:06:02
Message-ID: 03d601bf8974$689b8ee0$1500000a@vgkk.co.jp (view raw or flat)
Thread:
Lists: pgsql-admin
Hi all,

    We're currently developing a Java application that does extensive
database connections to PostgresSQL. During our testing phases we're quite
often killing the application before it has a chance to properly close the
database connections. In most cases Postgres seems to detect a "connect
reset by peer" and closes its connections as well. Sometimes, however, this
does not happen and the Postgres connections (or their associated
processes) remain, seemingly, forever. When we first noticed this problem
the oldest connection/process was 9 days old.
    The obvious problem is that as these dead connections increase we reach
the point where Postgres runs out of connections. So, I was wondering if
there is anyway to tell Postgres to kill a connection after a certain length
of inactivity.

    If not, how do other people overcome this problem?


    BTW, we're running Postgres on a Linux box with PostgreSQL version
6.5.3.


    Any help would be greatly appreciated.


--Rainer




pgsql-admin by date

Next:From: AnibalDate: 2000-03-09 06:04:32
Subject: autonumeric column
Previous:From: Walter M. YuanDate: 2000-03-09 02:10:58
Subject: help on permission!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group