From: Rainer Mager <rmager@vgkk.co.jp>
To: pgsql-admin@postgresql.org
Subject: Connections don't time out.
Date: Thu, 9 Mar 2000 12:06:02 +0900
Message-ID: <03d601bf8974$689b8ee0$1500000a@vgkk.co.jp> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: rmager@vgkk.co.jp
Subject: Re: Connections don't time out.
In-Reply-To: <03d601bf8974$689b8ee0$1500000a@vgkk.co.jp>
References: <03d601bf8974$689b8ee0$1500000a@vgkk.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox