<div dir="ltr">Is it recommended to use serialize_accept = on when num_init_children 200 or more?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 1, 2021 at 7:51 PM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> Hi,<br>
> <br>
> I incremented num_init_children from 120 to 200 today for testing. max_pool<br>
> = 1 and connection_cache = off.<br>
> We have 2 pgpool servers but the one that is connected to VIP one will be<br>
> active and the other is for failover.<br>
<br>
Ok.<br>
<br>
> We have 2 backend postgres DB servers with max_connections 250.<br>
> So the 1 * 200 < 250 rule is satisfied.<br>
<br>
Right.<br>
<br>
> My concern is whether there is any way to wait in the queue if the<br>
> connections are more than 200 instead of throwing this error.<br>
> We don't have long running queries sothe connections will be available shortly.<br>
<br>
You can set reserved_connections = 0 to not throw the error. In this<br>
case if more than 200 clients try to connect to Pgpool-II, they will<br>
be queued in the listen queue. This should work well as long as you<br>
don't have long running queries.<br>
<br>
> On Thu, Jul 1, 2021 at 4:45 PM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>> wrote:<br>
> <br>
>> Looking into the pgppol.conf, I noticed num_init_children is 200,<br>
>> rather than 120. Also it seems you have 2 Pgpool servers: db1 and db2.<br>
>> Does your application servers accesses both db1 and db2? If so, the<br>
>> required max_connections for PostgreSQL would be at least 400 because<br>
>> 2 Pgpool servers connect to PostgreSQL with up to num_init_children =<br>
>> 200 each, thus up to 400 connections will be made.<br>
>><br>
>> > Hi,<br>
>> ><br>
>> > Pgpool-II version: pgpool-II version 4.2.2 (chichiriboshi)<br>
>> > pgpool.conf attached. Kindly check.<br>
>> ><br>
>> > Thanks!<br>
>> ><br>
>> ><br>
>> > On Thu, Jul 1, 2021 at 1:46 PM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>> wrote:<br>
>> ><br>
>> >> > Hi,<br>
>> >> ><br>
>> >> > After integrating pgpool with the app server, we tested by running<br>
>> load<br>
>> >> > tests with 25 concurrent users.<br>
>> >> > The following error comes multiple times while test running:<br>
>> >> ><br>
>> >> >> ERROR:  Sorry, too many clients already<br>
>> >> >> LOG:  backend [1]: WARNING: there is already a transaction in<br>
>> progress<br>
>> >> ><br>
>> >> ><br>
>> >> > Set the following in pgpool:<br>
>> >> > connection_cache=off<br>
>> >> > child_life_time = 5min<br>
>> >> > num_init_children=120<br>
>> >> > max_pool=1<br>
>> >> ><br>
>> >> > There are master-slave postgre DB servers with max_connections=250.<br>
>> >> > There are 2 appservers with XADatasource max pool size 60, pointing to<br>
>> >> the<br>
>> >> > Pgpool server.<br>
>> >> > The application connects to 4 databases but only one database is used<br>
>> >> 90%.<br>
>> >> ><br>
>> >> > When we point directly to the master DB server, all works fine. But<br>
>> when<br>
>> >> > connected via the Pgpool server, these errors come intermittently.<br>
>> >> ><br>
>> >> > Is it because Pgpool connections are not getting released and are all<br>
>> in<br>
>> >> > active state?<br>
>> >> > Is there any way the excess connection requests in the queue instead<br>
>> >> > of throwing errors so that it will be processed once existing<br>
>> connections<br>
>> >> > are released?<br>
>> >> > Anyone please help me identify the bottleneck.<br>
>> >><br>
>> >> Can you share the exact Pgpool-II version and pgpool.conf?<br>
>> >><br>
>> >> Best regards,<br>
>> >> --<br>
>> >> Tatsuo Ishii<br>
>> >> SRA OSS, Inc. Japan<br>
>> >> English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
>> >> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
>> >><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Life is like this: "Just when we get all the answers of life.... God<br>
>> > changes the question paper....<br>
>> ><br>
>> > Valsaraj Viswanathan<br>
>><br>
> <br>
> <br>
> -- <br>
> Life is like this: "Just when we get all the answers of life.... God<br>
> changes the question paper....<br>
> <br>
> Valsaraj Viswanathan<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Life is like this: "Just when we get all the answers of life.... God changes the question paper....<br><br>Valsaraj Viswanathan</div>