How to handle missing pgsql.connect_timeout

Поиск
Список
Период
Сортировка
От Janning Vygen
Тема How to handle missing pgsql.connect_timeout
Дата
Msg-id 200502010938.17853.vygen@gmx.de
обсуждение исходный текст
Ответы Re: How to handle missing pgsql.connect_timeout
Список pgsql-php
Hi,

i use persitent connections and limit them for example to
pgsql.max_persistent = 32

if all connections are in use a new http call to my script's pg_pconnect
results in waiting for a free slot. That's fine, because usually a slot is
getting free within a second.

But if my server is much more overloaded and it would take more than 5 seconds
to wait for a free slot it doesnt make sense to wait, because the user would
hit stop anyway without getting a serious error message.

it would be nice to have a timeout value after which pg_pconnect returns with
an error, so could show a nice error page telling the user to try again in a
few minutes.

i found the php directive mysql.connect_timeout which does exactly what i
want. There is no such directive for pgsql.

I tried pgpool searching in pgpool for a connection timeout directive, but i
didn't found one.

It would be so nice to have a timeout of 3 seconds and after it display an
error message to the user instead of let him waiting and waiting.

Does anybody has any hints to solve this problem?

kind regards
janning





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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: to_char replacement
Следующее
От: Christopher Murtagh
Дата:
Сообщение: Re: How to handle missing pgsql.connect_timeout