[pgpool-general: 2636] Blocking of excessive connections

Sam Wouters sam at ericom.be
Tue Mar 18 18:57:34 JST 2014


Hi,

 

Is it possible to change the behaviour of handling of client connections
when more than num_init_children try to connect? We have a number of
applications using a drop wizard connection pool to connect to the pgpool-II
cluster. In an ideal situation these applications would be sized to the
maximum amount of available connection, but as said, this would be an ideal
situation. In real life, some of these application try to allocate more
connections then available, but instead of a connection error the
application pool just waits for the connection to become active. As such,
one misconfigured application can hold all the connections of the pool,
blocking all other applications.

 

It would be great if we could mimic the standard postgresql rejection or
even better, put some timeout value for the queued connections. For
instance, queue a new connection if no available pool processes for x time,
reject after x time if no processes are freed to handle the queued
connection. As such, the application pool would know that the extra
connection didn't succeed and would pool the request to one of the already
open connections.

 

An even better way of coping with this would be to be able to limit the
amount of connections per user/database/ip. I still need to test what
happens if you put a user limit in postgresql, for example, if you put a
connection limit of 4 for user test on postgresql level, what happens if you
try to open 5 connections to the pgpool with some processes left to handle
connections. Does it reject the connection or does it queue it?

 

Regards,

Sam

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20140318/e7438e51/attachment.html>


More information about the pgpool-general mailing list