Re: idle connections

Поиск
Список
Период
Сортировка
От Aras Angelo
Тема Re: idle connections
Дата
Msg-id 5136d4130910051650y775c6bb4odbdd759e3952eb32@mail.gmail.com
обсуждение исходный текст
Ответ на Re: idle connections  (Scott Marlowe <scott.marlowe@gmail.com>)
Ответы Re: idle connections
Re: idle connections
Re: idle connections
Список pgsql-admin
Its a regular pg_connect()

When i kill the earliest idle process the others stop too. So i dont know whats wrong really. All our apps use the same footer, with pg_close() at the end.

I have done most of the things you guys suggested, so it seems to me that something between php-apache-postgresql is not doing good, and it only effects us at peak times, so just wondering if killing processes every 2-3 minutes, would do harm on our setup.

I have 3 apache servers reading from one single db server.

On Mon, Oct 5, 2009 at 4:48 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
On Mon, Oct 5, 2009 at 4:42 PM, Aras Angelo <araskoktas@gmail.com> wrote:
> Hi,
>
> Im seeing lots of idle connections (not idle in transaction) to my database
> server. My front end is written with PHP and i couldnt find anything that
> can cause this. If i do a kill proc-id every few minutes on my server via
> cron, would this effect anything badly?

Are you using pg_pconnect?

pg_pconnect is a foot gun waiting to happen.  It's an otherwise very
useful foot gun, but a foot gun none-the-less.

The problem is that by default apache is usually set up to have more
max connections / children / threads etc. than postgresql is to have
backends available.  This just gets worse if you run < 1 apache server
machine.

The simple solution is to turn off pg_pconnect.

If  things are then too slow then you can start planning for
connection pooling / pg_pconnect otherwise don't sweat it.  For low
level intranet servers, regular pg_connect will work just fine.

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

Предыдущее
От: "Lee, Mija"
Дата:
Сообщение: constraints set to deferrable by default
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: idle connections