killing idle postgres instances

From: "Marcus Andree S(dot) Magalhaes" <marcus(dot)magalhaes(at)vlinfo(dot)com(dot)br>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: killing idle postgres instances
Date: 2004-02-05 19:52:55
Message-ID: 28140.200.161.200.85.1076010775.squirrel@webmail.webnow.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Hi, everyone,

I've noticed a somewhat annoying problem while using a java
program to do some periodic work on some postgresql tables.

We have a java program scheduled to run a few times in an hour and
the server backend keeps running when the java program exits.

This leads to a leak behaviour: each backend instance eats some
resources (mainly memory, since the connection is idle) and, in
a few hours, our server starts swapping and begins to spiral down.

Is there any way to prevent this behaviour? I guess there's a postgres
option to limit the time that a statement can run, but we rather prefer
another, less traumatic solution like automagically killing idle connections.

Can this be configured on the server side or should we start doing some
hack shell scripts to do it?

Thanks a lot.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2004-02-05 22:18:03 Re: killing idle postgres instances
Previous Message Nadeem Bitar 2004-02-05 17:41:02 unpredictable behavior