On Fri, 2011-10-07 at 13:51 -0400, Brandon Phelps wrote:
> So we decided to go with pgpool-II. The documentation is a little lacking for pgpool-II so I have one question:
>
> How are connections handled once the default levels are reached? Here are my pgpool settings:
>
> num_init_children = 32
> max_pool = 4
>
This configuration means you can have at most 32 clients sending queries
at the same time to PostgreSQL via pgpool. With a max_pool of 4, each
pgpool process can handle four different connections to the same server:
they could differ either by the database name or by the user name.
> This creates 32 child processes when we start pgpool which I understand. Each time I browse to a page from our web
appand do a netstat -an on the web server (running pgpool) I see an additional connection to the database server, which
looksgood. I assume that once 32 connections are opened at once then pgpool will start re-using them, based on the
num_init_children* max_pool... But since 32 * 4 = 128, what will happen on the 129th connection? Will a new child get
created,allowing for 4 more connections (1 * max_pool), or will that connection be denied?
>
Connection is not denied (that would be the behaviour of PostgreSQL).
Connection is on hold waiting for a pgpool process to be available.
Meaning you don't want long connections.
--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com