<div dir="ltr"><div><div><div><div><div><div><div><div>Hi all,<br>I created a patch file of wd_lifecheck.c for stabilizing.<br></div>When I use pgpool-II 3.5.4 on the vm server,  life check often failed.<br></div>Cause the vm server has fast clock CPU&#39;s and slow network periphelal.<br></div>In this case the watchdog process had often failed to connect with other nodes.<br></div>Therefore, I add sleep() instead of usleep() and retry routine in network connection.<br><br></div>In my case, the watchdog process was stabilized by this fix.<br></div>I&#39;d like to merge this patch when you confirm that there is no problem.<br><br></div>Regards,<br><br></div><div>--- src/watchdog/<a href="http://wd_lifecheck.c.org">wd_lifecheck.c.org</a>     2016-09-30 10:38:42.647168825 +0900<br>+++ src/watchdog/wd_lifecheck.c 2016-09-30 10:51:06.402749336 +0900<br>@@ -804,7 +804,7 @@ check_pgpool_status_by_query(void)<br>                rc = pthread_join(thread[i], (void **)&amp;result);<br>                if ((rc != 0) &amp;&amp; (errno == EINTR))<br>                {<br>-                       usleep(100);<br>+                       sleep(1);<br>                        continue;<br>                }<br><br>@@ -953,11 +953,19 @@ wd_check_heartbeat(LifeCheckNode* node)<br> static int<br> wd_ping_pgpool(LifeCheckNode* node)<br> {<br>-       PGconn * conn;<br>+       PGconn * conn = NULL;<br>+       int cnt = 0;<br><br>-       conn = create_conn(node-&gt;hostName, node-&gt;pgpoolPort);<br>-       if (conn == NULL)<br>-               return WD_NG;<br>+       while (conn == NULL)<br>+       {<br>+               conn = create_conn(node-&gt;hostName, node-&gt;pgpoolPort);<br>+               if ((conn == NULL) &amp;&amp; (cnt &gt; pool_config-&gt;wd_life_point))<br>+               {<br>+                       return WD_NG;<br>+               }<br>+               sleep(1);<br>+               cnt ++;<br>+       }<br>        return ping_pgpool(conn);<br> }<br></div><div><br>--<br></div>At.Mitani<br><div><div><div><div><br></div></div></div></div></div>