Received: from smtp02.mail.gol.com (smtp02.mail.gol.com [203.216.5.12]) by hub.org (8.9.3/8.9.3) with ESMTP id WAA52846 for ; Wed, 8 Mar 2000 22:04:36 -0500 (EST) (envelope-from rmager@vgkk.co.jp) Received: from wks02 (tc-2-222.ariake.gol.ne.jp [203.216.43.222]) by smtp02.mail.gol.com (Postfix) with SMTP id 0584715764 for ; Thu, 9 Mar 2000 12:04:04 +0900 (JST) Message-ID: <03d601bf8974$689b8ee0$1500000a@vgkk.co.jp> From: "Rainer Mager" To: Subject: Connections don't time out. Date: Thu, 9 Mar 2000 12:06:02 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 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