killing idle postgres instances
От | Marcus Andree S. Magalhaes |
---|---|
Тема | killing idle postgres instances |
Дата | |
Msg-id | 28140.200.161.200.85.1076010775.squirrel@webmail.webnow.com.br обсуждение исходный текст |
Ответы |
Re: killing idle postgres instances
|
Список | 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.
В списке pgsql-jdbc по дате отправления: