From: Rainer Mager <rmager@vgkk.co.jp>
To: pgsql-admin@postgresql.org
Subject: Killing off old postgres processes in a friendly way?
Date: Fri, 28 Apr 2000 09:53:14 +0900
Message-ID: <NEBBJBCAFMMNIHGDLFKGEECBCBAA.rmager@vgkk.co.jp> (raw)
In-Reply-To: <39085AD3.AA3F78F1@ife.org.mx>
Hi all,
I believe something like this question has been asked here before but I
don't remember seeing an answer.
Briefly, the problem we are having is that we sometimes open connections
(JDBC) to our database and then do not properly close them. The odd thing is
that postgres itself does not EVER seem to time them out and close them.
We've had processes over 2 weeks old that just sat there doing nothing.
Finally we restarted postgres to fix the problem.
So, is there a setting to postgres (postmaster) so that it will timeout
old, unused connections?
In more detail:
We have a Java application that uses JDBC to connect to a postgres
database. The app uses a connection pool to improve performance. When the
app starts up it creates some number of connections for this pool (e.g.,
10). During our development process, we are offing debugging/killing the app
in mid-run. This means that it dies immediately without ever properly
closing the connections.
The result of this is that the process exist on the postgres sever machine
until we restart postmaster. It appears that this is not a problem in our
production system because the debugging killing of the app does not occur.
However, we would like to find a setting to postgres so that it proactively
cleans up old connections.
How can this be done?
--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: Killing off old postgres processes in a friendly way?
In-Reply-To: <NEBBJBCAFMMNIHGDLFKGEECBCBAA.rmager@vgkk.co.jp>
References: <39085AD3.AA3F78F1@ife.org.mx> <NEBBJBCAFMMNIHGDLFKGEECBCBAA.rmager@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