<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:medium;"><div><div>Thomas</div><div><br></div><div>Maybe you simply need to increase the value of num_init_children. Once the pool is full, i.e. once there are num_init_children active connections, then the next connection attempt will hang until a connection is free. So it will be exactly like the behavior you are seing.</div><div><br></div><div>You can do a select from pg_stat_activity (connect directly to postgres, not to pgpool, otherwise you will be queued): it the number of rows is equal to num_init_children then for sure you are hitting this limit</div><div><br></div><div>Pierre</div><div><br></div></div><div><br></div><div><br></div><hr><div id="ydp699df61yahoo_quoted_7281814102" class="ydp699df61yahoo_quoted"><div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div>On Tuesday, June 6, 2017, 4:01:43 PM GMT+2, Thomas Höll &lt;Thomas.Hoell@neos-it.de&gt; wrote:</div><div><br></div><div><br></div><div><div id="ydp699df61yiv0805466400">

 

<div>
<div>Hi all,</div>
<div><br>
</div>
<div>we're having a streaming replication setup as backend for one of our client's application we're hosting.</div>
<div>The backend consists of two virtual machines (Fedora Server 25) running PostgreSQL 9.6 and Pgpool 3.6.4 (this also happened with previous Pgpool versions).</div>
<div><br>
</div>
<div>Those machines are configured for streaming replication in master/slave mode. The Postgres-Instances are running fine, but Pgpool is giving us troubles.</div>
<div><br>
</div>
<div>After some time, Pgpool stops accepting connections. They are not rejected, the application trying to connect simply hangs. I have to stop the corresponding Pgpool-Instance</div>
<div>and the other takes over. The stopping itself takes forever. After some time, systemd simply kills the processes and I have to manually delete the leftover sockets.</div>
<div><br>
</div>
<div>I have absolutely no idea what's causing this. The Postgres-Instances are configured to accept up to 1000 connections, which should not be the problem.</div>
<div><br>
</div>
<div>About the application accessing the database:</div>
<div><br>
</div>
<div>There are multiple instances, each using a separate database. The application uses Activiti, which DOES NOT pool connections. So we're having a pretty high amount of</div>
<div>connections per second. The problem mostly occurs during peak hours, so load is most likely a factor.&nbsp;</div>
<div><br>
</div>
<div>I've tried plaing around with num_init_children and max_pool. Increasing max_pool and lowering num_init_children made things a lot worse.</div>
<div><br>
</div>
<div>Also, Pgpool still accepts pool join requests from other Pgpool instances, it's just that database connections aren't handled anymore.</div>
<div><br>
</div>
<div>You can find my pgpool.conf here: <a href="https://pastebin.com/4ee2bhhf" rel="nofollow" target="_blank">https://pastebin.com/4ee2bhhf</a></div>
<div><br>
</div>
<div>Regards,</div>
<div>Thomas</div>
<div><br>
</div>
<div><span>
<pre>-- <br></pre>
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<b><span style="font-size:12pt;color:rgb(38, 38, 38);">NeosIT GmbH</span></b></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:gray;">Wir schaffen IT, die die Welt ein Stück einfacher macht.</span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<b><span style="font-size:12pt;color:rgb(127, 127, 127);"> &nbsp;</span></b></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:rgb(127, 127, 127);">Schachtweg 1</span><span style="color:rgb(200, 231, 168);"></span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:rgb(127, 127, 127);">38440 Wolfsburg</span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:rgb(127, 127, 127);"> &nbsp;</span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:rgb(127, 127, 127);">Tel. +49 5361 83494-23</span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:rgb(127, 127, 127);">Fax +49 5361 83494-94</span></p>
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:gray;"><a href="mailto:christoph.steindorff@neos-it.de" style="color:purple;" rel="nofollow" target="_blank"><span style="color:gray;">mailto:thomas.hoell@neos-it.de</span></a></span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:gray;"><a href="http://www.neos-it.de/" style="color:purple;" rel="nofollow" target="_blank"><span style="color:gray;">http://www.neos-it.de/</span></a></span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:gray;"><a href="http://www.facebook.com/neositgmbh" style="color:purple;" rel="nofollow" target="_blank"><span style="color:gray;">http://www.facebook.com/neositgmbh</span></a></span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:rgb(127, 127, 127);"> &nbsp;</span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:rgb(127, 127, 127);">Handelsregister: Amtsgericht Braunschweig, HRB 203557</span></p> 
<p class="ydp699df61yiv0805466400MsoNormal" style="margin:0cm 0cm 0.0001pt;font-family:Calibri, sans-serif;color:rgb(0, 0, 0);">
<span style="color:rgb(127, 127, 127);">Geschäftsführer: Sebastian Schier</span></p>
</span></div>
</div>

</div>_______________________________________________<br>pgpool-general mailing list<br><a href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br><a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br></div></div></div></div></body></html>