<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
.EmailQuote
        {margin-left:1pt;
        padding-left:4pt;
        border-left:#800000 2px solid}
-->
</style>
</head>
<body>
<span style="font-family:Verdana,Arial,Helvetica,sans-serif; font-size:small; color:black">Sorry, forgot to post to the list
<br>
<br>
Mobil gesendet.<br>
<br>
<span style="color:black">-----Original Message----- <br>
<b>From:</b> Ludwig Adam [ludwig.adam@petafuel.de]<br>
<b>Received:</b> Dienstag, 08 Mai 2012, 17:51<br>
<b>To:</b> ishii@postgresql.org [ishii@postgresql.org]<br>
<b>Subject:</b> Re: [pgpool-general: 419] Re: pg-pool-3.0.4. -unable to create child processes<br>
<br>
</span></span>
<div>
<div style="font-family:Verdana,Arial,Helvetica,sans-serif; font-size:small; color:black">
<span style="font-family:Verdana,Arial,Helvetica,sans-serif; font-size:small; color:black">Dear Tatsuo,
<br>
<br>
this seems to be a very high estimation. In our environment one child has max pool size of 1, i . e. It manages one connection to the backend. Memory usage of a idle process according to ps aux says 0.1 percent per child, which translates to roughly 1 meg if
 I am not mistaken... <br>
<br>
Thanks, <br>
Ludwig <br>
<br>
Mobil gesendet.<br>
<br>
<span style="color:black">-----Original Message----- <br>
<b>From:</b> Tatsuo Ishii [ishii@postgresql.org]<br>
<b>Received:</b> Dienstag, 08 Mai 2012, 17:37<br>
<b>To:</b> Ludwig Adam [ludwig.adam@petafuel.de]<br>
<b>CC:</b> pgpool-general@pgpool.net [pgpool-general@pgpool.net]<br>
<b>Subject:</b> Re: [pgpool-general: 419] Re: pg-pool-3.0.4. -unable to create child processes<br>
<br>
</span></span></div>
<font size="2"><span style="font-size:10pt">
<div class="PlainText">On my x86_64 linux machine, a pgpool process's VMSize is<br>
56692&#43;(68*num_init_children) (unit is kb). num_init_children = 1500<br>
case, it will be 158692 kb. So total VMSize is 158692 * 1500 =<br>
238038000, which is about 227GB. I'm not sure how much of 227GB is<br>
actually required since some of memory is shared among multiple<br>
process, but I guess 1GB mem is too small.<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese: <a href="http://www.sraoss.co.jp">http://www.sraoss.co.jp</a><br>
<br>
&gt; Dear list,<br>
&gt; <br>
&gt; just to provide you an update on the systems spec, as I have seen that the failed fork may be limited to some memory constraints / limits:<br>
&gt; <br>
&gt; We have set the num_init_childs to 1500 (from which ~500 are connected at low system load and around 900 at peak times currently).<br>
&gt; The allocated RAM for the machine is 1 GB- what's your recommendation for the relation of allocated RAM and # of pgpool childs?<br>
&gt; <br>
&gt; I would suspect a memory leak on the connected, non-idle processes (as we are still running 3.04) but the kind of error message does not make really sense- why should just a fork not be possible and also we had no child processes at all running.<br>
&gt; <br>
&gt; <br>
&gt; Ludwig<br>
&gt; <br>
&gt; <br>
&gt; petaFuel GmbH<br>
&gt; Ludwig Adam<br>
&gt; Geschäftsführer<br>
&gt; <br>
&gt; Geschäftsführer: Ludwig Adam, Dr. Peter Schönweitz<br>
&gt; Amtsgericht München, HRB 133773<br>
&gt; <br>
&gt; Tel.: &#43;49 (0) 8161 4060 - 202&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mobil: &#43;49 (0) 179-22 911 02<br>
&gt; <br>
&gt; Von: Ludwig Adam<br>
&gt; Gesendet: Montag, 7. Mai 2012 17:15<br>
&gt; An: pgpool-general@pgpool.net<br>
&gt; Cc: EDV<br>
&gt; Betreff: pg-pool-3.0.4. -unable to create child processes<br>
&gt; <br>
&gt; Dear list,<br>
&gt; <br>
&gt; we just encountered a production issue with pg-pool-3.0.4.: pg-pool killed all idle childprocesses which were waiting for a connection request and failed to create new ones.<br>
&gt; <br>
&gt; I am unsure why the childs exited:<br>
&gt; <br>
&gt; <br>
&gt; 1)&nbsp;&nbsp;&nbsp; As we have child_life_time = 300 I guess the childs exited normally after a 5 minute period.<br>
&gt; <br>
&gt; 2)&nbsp;&nbsp;&nbsp; We did a Config reload on pg_pool, and that could mean also that waiting child processes are killed<br>
&gt; <br>
&gt; but pg_pool did not create new ones. So we were left with ~110 active pg-pool processes (which still seemed to work) but we could make no new connections to pgppol (can't tell if the connections have been queued or not).<br>
&gt; This is what the syslog says:<br>
&gt; <br>
&gt; May&nbsp; 7 15:43:13 pgpool-PrepaidDB-HA1 pgpool: 2012-05-07 15:43:13 LOG:&nbsp;&nbsp; pid 938: reload config files.<br>
&gt; May&nbsp; 7 15:43:13 pgpool-PrepaidDB-HA1 pgpool: 2012-05-07 15:43:13 LOG:&nbsp;&nbsp; pid 2707: reload config files.<br>
&gt; May&nbsp; 7 16:09:29 pgpool-PrepaidDB-HA1 pgpool: 2012-05-07 16:09:17 ERROR: pid 938: fork() failed. reason: Resource temporarily unavailable<br>
&gt; May&nbsp; 7 16:09:34 pgpool-PrepaidDB-HA1 pgpool: 2012-05-07 16:09:34 LOG:&nbsp;&nbsp; pid 29194: connect_inet_domain_socket_by_port: exit request has been sent<br>
&gt; May&nbsp; 7 16:09:34 pgpool-PrepaidDB-HA1 pgpool: 2012-05-07 16:09:34 ERROR: pid 29194: connection to &lt;backendserver ha1 here&gt; (5432) failed<br>
&gt; May&nbsp; 7 16:09:34 pgpool-PrepaidDB-HA1 pgpool: 2012-05-07 16:09:34 ERROR: pid 29194: new_connection: create_cp() failed<br>
&gt; May&nbsp; 7 16:09:34 pgpool-PrepaidDB-HA1 pgpool: 2012-05-07 16:09:34 LOG:&nbsp;&nbsp; pid 29194: notice_backend_error: 0 fail over request from pid 29194<br>
&gt; May&nbsp; 7 16:30:22 pgpool-PrepaidDB-HA1 heartbeat: [2425]: info: pgpool-prepaiddb-ha1 wants to go standby [all]<br>
&gt; <br>
&gt; We also noticed some high load on the server which may be related to the issue.<br>
&gt; <br>
&gt; Any idea what the the cause of this issue is? Do you recommend setting child_life_time = 0? I think there are some memory leak issues in the 3.0.4 versions.<br>
&gt; 3.0.4 is the latest official version in the Ubuntu repository and we would rather not go to self-compiled versions for reasons of maintenance and compliance.<br>
&gt; <br>
&gt; Best regards,<br>
&gt; Ludwig<br>
&gt; <br>
&gt; petaFuel GmbH<br>
&gt; Ludwig Adam<br>
&gt; Geschäftsführer<br>
&gt; <br>
&gt; Münchner Strasse 4<br>
&gt; 85354 Freising<br>
&gt; <br>
&gt; Tel.: &#43;49 (0) 8161 4060 - 202&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mobil: &#43;49 (0) 179-22 911 02<br>
&gt; Fax: &#43;49 (0) 8161 4060 - 401&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eMail: ludwig.adam@petafuel.de&lt;mailto:ludwig.adam@petafuel.de&gt;<br>
&gt; <br>
&gt; Geschäftsführer: Ludwig Adam, Dr. Peter Schönweitz<br>
&gt; Amtsgericht München, HRB 133773<br>
&gt; <a href="http://www.petaFuel.de">www.petaFuel.de</a><br>
&gt; <br>
</div>
</span></font></div>
</body>
</html>