<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.Stylwiadomocie-mail17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="PL" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hello Tatsuo,<o:p></o:p></p>
<p class="MsoNormal">We have encountered such a problem today:<o:p></o:p></p>
<p class="MsoNormal">FATAL:  failed to fork a child<o:p></o:p></p>
<p class="MsoNormal">DETAIL:  system call fork() failed with reason: Resource temporarily unavailable<o:p></o:p></p>
<p class="MsoNormal">It seems to be strange because all necessary resources (CPU, RAM) should be available, number of allowed proccesses that can be created by postgres user (pgpool is registered in systemd and works with postgres account) is definitely enough
 to cover 2048 processes (1024 processe of pgpool and 1024 processes of postgresql). Pgpool hanged with only two subprocesses started:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Main PID: 9584 (pgpool)<o:p></o:p></p>
<p class="MsoNormal">    Tasks: 3 (limit: 1024)<o:p></o:p></p>
<p class="MsoNormal">   CGroup: /system.slice/pgpool-II-11.service<o:p></o:p></p>
<p class="MsoNormal">           <span style="font-family:"Arial",sans-serif">├</span>─ 9584 /usr/pgpool-11/bin/pgpool -f /etc/pgpool-II-11/pgpool.conf -n -D<o:p></o:p></p>
<p class="MsoNormal">           <span style="font-family:"Arial",sans-serif">├</span>─10596 pgpool: health check process(0)<o:p></o:p></p>
<p class="MsoNormal">           └─10597 pgpool: health check process(1)<o:p></o:p></p>
<p class="MsoNormal">Do you have any suggestions what could cause this problem? We have changed „TasksMax” option from default 512 to 1024 for postgresql and pgpool services but as i wrote before – number of processes that can be created by postgres user is
 far above 2048. I have also checked typical number of running processes in our system (about 500) to exclude problem with insufficient value of kernel.pid_max (32768) parameter.<o:p></o:p></p>
<p class="MsoNormal">Best regards and thank you in advance for help.<o:p></o:p></p>
<p class="MsoNormal"><b><span style="mso-fareast-language:PL"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="mso-fareast-language:PL">Andrzej Rozmus<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#161616;background:white;mso-fareast-language:PL">Starszy Technolog</span><span style="mso-fareast-language:PL"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#161616;mso-fareast-language:PL">Departament Systemów Administracji Rządowej</span><span style="mso-fareast-language:PL"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#161616;mso-fareast-language:PL">Dział Ministerstwo Finansów</span><span style="mso-fareast-language:PL"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#161616;background:white;mso-fareast-language:PL">Zespół Projektowy AIS/AES</span><span style="mso-fareast-language:PL"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:9.0pt;mso-fareast-language:PL">Asseco Poland S.A.</span></b><span style="font-size:9.0pt;mso-fareast-language:PL"><br>
ul. Branickiego 13<br>
02-972 Warszawa<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#161616;background:white;mso-fareast-language:PL">tel. kom. +48 502 270 059</span><b><span style="mso-fareast-language:PL"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="mso-fareast-language:PL">andrzej.rozmus@asseco.pl<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>