<div dir="ltr"><div dir="ltr"><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div>@Piotr...<br></div><div>I will try again :)</div><div><br></div><div>Maybe you do not need that connection pool configuration. Read this, because 

num_init_children  and  max_pool  parameters can bring confusion:</div><div><a href="https://www.pgpool.net/mediawiki/index.php/Relationship_between_max_pool,_num_init_children,_and_max_connections">https://www.pgpool.net/mediawiki/index.php/Relationship_between_max_pool,_num_init_children,_and_max_connections</a></div><div><br></div><div>For example: I have multiple users connecting to multiple databases through multiple applications (web and desktop). After some tests the configuration that works better for my is:</div><div><br></div><div>num_init_children = 800<br></div><div>max_pool = 1</div><div>child_life_time = 120</div><div>child_max_connections = 0</div><div>connection_life_time = 0</div><div>client_idle_limit = 0</div><div><br></div><div>NOTE: The desktop clients (around 500) connect to the database and keep the connection until the application is closed. That&#39;s why I do not need connection pool.</div><div><br></div><div>The machines are:</div><div>1) Two pgpool 3.6.4 nodes : Centos 7, 6 processors and 6GB Ram.</div><div>Normally does not reach 50% of memory and 30% of processors.</div><div><br></div><div>In the past I had problems with a hight memory usage (almost 100%), but it was caused by a test with memmory_cache_enabled = on, when I setted to off, the problem was solved.</div><div><br></div><div>2) Two postgres 9.6 nodes: Centos 7, 12 cores, 16GB Ram</div><div>Normally does not reach 40% of memory and 40% of processors.</div><div><br></div><div>Regards,</div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">El vie., 21 de sep. de 2018 a la(s) 08:21, Tatsuo Ishii (<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt; When I stop client, then memory usage starts decreasing, so it’s good assumption that is not memory leak?<br>
<br>
Probably child_life_time affects here. If Pgpool-II child process are<br>
in ilde state because clients gets diconnected, they sucide after 300<br>
seconds (according to your pgpool.conf) passed.<br>
<br>
&gt; What do you mean by self contained test case?<br>
<br>
A test case which can be executed by someone else (Pgpool-II<br>
developers).<br>
<br>
&gt; I probably can increase mamry on VM, but what size should be good?<br>
<br>
No idea at this point. If the memory usage is caused by memory leak,<br>
there will be no memory usage limit. If that is not caused by memory<br>
leak, the only way to guess the value is observe the memory usage<br>
until they go into a steady state.<br>
<br>
&gt;&gt; Wiadomość napisana przez Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt; w dniu 21.09.2018, o godz. 01:26:<br>
&gt;&gt; <br>
&gt;&gt; Is it possible for you to provide a self contained test case?<br>
&gt;&gt; <br>
&gt;&gt; You have 175 pgpool process. So each process allows to use up to<br>
&gt;&gt; 16GB/175 = 93.6MB RAM (of course this number does not include the<br>
&gt;&gt; memory for OS).  With this number, it is hard to tell if it&#39;s caused<br>
&gt;&gt; by memory leak or normal, since if applications send large SQL texts<br>
&gt;&gt; or receive large data set returned from PostgreSQL, they could easily<br>
&gt;&gt; eat this amount of memory. So self contained case is essential to know<br>
&gt;&gt; whether this is a memory leak or normal thing.<br>
&gt;&gt; <br>
&gt;&gt; Best regards,<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; 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>
&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt; <br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt; OS - Ubuntu 16.04<br>
&gt;&gt;&gt; pgpool.conf - <a href="https://gist.github.com/pwojcieszonek/c0a8f670982f021f5e3f4fba2a7b52ae" rel="noreferrer" target="_blank">https://gist.github.com/pwojcieszonek/c0a8f670982f021f5e3f4fba2a7b52ae</a> &lt;<a href="https://gist.github.com/pwojcieszonek/c0a8f670982f021f5e3f4fba2a7b52ae" rel="noreferrer" target="_blank">https://gist.github.com/pwojcieszonek/c0a8f670982f021f5e3f4fba2a7b52ae</a>&gt;<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; Wiadomość napisana przez Bo Peng &lt;<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>&gt; w dniu 20.09.2018, o godz. 08:04:<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; Which OS do you use?<br>
&gt;&gt;&gt;&gt; And could you provide pgpool.conf?<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; On Wed, 19 Sep 2018 14:09:21 +0200<br>
&gt;&gt;&gt;&gt; Piotr Wojcieszonek &lt;<a href="mailto:p.wojcieszonek@bosmanager.com" target="_blank">p.wojcieszonek@bosmanager.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;&gt; I have problem with PG-POOL with high memory usage. <br>
&gt;&gt;&gt;&gt;&gt; After couple of minutes it consume all of 16GB of ram and start using SWAP.<br>
&gt;&gt;&gt;&gt;&gt; When I restart service it start to slowly alocate all of available memory.<br>
&gt;&gt;&gt;&gt;&gt; I check on 3.7.4 and 3.7.5<br>
&gt;&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; pgpool-general mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
&gt;&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; -- <br>
&gt;&gt;&gt;&gt; Bo Peng &lt;<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>&gt;<br>
&gt;&gt;&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt; <br>
_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</blockquote></div>