How to handle missing pgsql.connect_timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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






[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux