Problem with leaking connections

Поиск
Список
Период
Сортировка
От Mark Lange
Тема Problem with leaking connections
Дата
Msg-id 005501ca2cae$fcfcd480$f6f67d80$@info
обсуждение исходный текст
Ответы Re: Problem with leaking connections  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Problem with leaking connections  (Andy Colson <andy@squeakycode.net>)
Re: Problem with leaking connections  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-general

Hi,

 

we have an webapplication running on tomcat6  with hibernate.

We are using the apache DBCP connection pool (tomcat built in) and an postgres 8.19 database server on an different host.

Every few days  the pool is  running out of connections.

The pool is configured to aggressively close connections when it is exhausted, but the application gets very slow when this happens, mostly we have to restart

the tomcat server.

#ps –aux | grep postgres on the database host shows me many open connections in the select or in transaction state (that never get closed until tomcat or postgres restart).

Is there a way to figure out which statement didn’t closed the connections?

 

In the application we found a few places where the connections not closed and fixed them.

But they are hard to find.

 

Is it possible to configure postgres to close connections after a timeout or something like this (maybe statement_timeout)?

Are there any other possibilities?

 

Thanks

Mark

 

 

В списке pgsql-general по дате отправления:

Предыдущее
От: Andy Colson
Дата:
Сообщение: Re: easy task: concurrent select-updates
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Problem with leaking connections