[pgpool-general: 2435] Re: pgpool connections: FATAL: sorry, too many clients already

Tatsuo Ishii ishii at postgresql.org
Thu Jan 16 15:42:50 JST 2014


> On Jan 16, 2014, at 10:10 AM, Tatsuo Ishii <ishii at postgresql.org> wrote:
> 
>>> It seems I misunderstood this formula :) 
>>> 
>>> I have 2 backends. Each can handle 27 connections. So I want pgpool to be able to handle 27*2 connections. 
>>> 
>>> 
>>> If I use 
>>> 
>>> 13 * 2 <= (30 -3 ) 
>>> 
>>> then the total number of connections won't exceed 26. Is that correct? 
>> 
>> Yes, correct.
>> 
> 
> So this where this calculation comes from. 
> I mean: 25*2 <= (30-3)*2

No. Pgpool-II connects to each backend independently. That's the
reason why following formulas do not include the number of PostgreSQL
nodes.

max_pool*num_init_children <= (max_connections - superuser_reserved_connections) (no query canceling needed)
max_pool*num_init_children*2 <= (max_connections - superuser_reserved_connections) (query canceling needed)

> If I use 13*2 <= (30-3) then there will be no way to utilize the capacity of all backend servers. Is that so? 

That depends on the definition of "utilize". Pgpool-II utilizes
standby servers as a resouce for load balance. It does not utilize
max_connection of PostgreSQL.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the pgpool-general mailing list