<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=us-ascii">
<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;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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="EN-AU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#1F497D;background:white">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#1F497D;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#555544;background:white">We have configured pgpool 3.3 for our PostgreSQL db in aws. And using the healthcheck parameters as below.</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#555544"><br>
<br>
<span style="background:white">health_check_period = 40</span><br>
<span style="background:white">health_check_timeout = 10</span><br>
<span style="background:white">health_check_max_retries = 2</span><br>
<span style="background:white">health_check_retry_delay = 2</span><br>
<br>
<span style="background:white">I am trying to test this by using an iptables rule in the active server. When I add a drop rule to the PostgreSQL db port it does trigger a timeout but I think it timeout too soon. I.e. according to my understanding it should
wait for the time period specified in "health_check_timeout " in this case, but actually times out in less than a second.(Please see the log below). Shouldn't it wait for 10 secs before time out or is my understanding incorrect. Please note that I checked
my DROP rule with telnet and it takes 60 seconds to time out.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#555544;background:white">I have restarted pgpool every time I tested this (I know just reloading would do)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#555544;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#555544;background:white">I have enabled debug mode just to check this.</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#555544"><br>
<br>
<span style="background:white">2014-05-13 12:14:43 DEBUG: pid 15822: health_check: 0 th DB node status: 1</span><br>
<span style="background:white">2014-05-13 12:14:44 LOG: pid 15857: connect_inet_domain_socket: select() timed out. retrying...</span><br>
<span style="background:white">2014-05-13 12:14:44 ERROR: pid 15822: connect_inet_domain_socket: select() timed out</span><br>
<span style="background:white">2014-05-13 12:14:44 ERROR: pid 15822: make_persistent_db_connection: connection to 10.0.0.5(5432) failed</span><br>
<span style="background:white">2014-05-13 12:14:44 DEBUG: pid 15822: health_check: 0 th DB node status: 1</span><br>
<span style="background:white">2014-05-13 12:14:45 LOG: pid 15857: connect_inet_domain_socket: select() timed out. retrying...</span><br>
<span style="background:white">2014-05-13 12:14:45 ERROR: pid 15822: connect_inet_domain_socket: select() timed out</span><br>
<span style="background:white">2014-05-13 12:14:45 ERROR: pid 15822: make_persistent_db_connection: connection to 10.0.0.5(5432) failed</span><br>
<span style="background:white">2014-05-13 12:14:45 ERROR: pid 15822: health check failed. 0 th host 10.0.0.5 at port 5432 is down</span><br>
<span style="background:white">2014-05-13 12:14:45 DEBUG: pid 15822: health check: clearing alarm</span><br>
<span style="background:white">2014-05-13 12:14:45 DEBUG: pid 15822: health check: clearing alarm</span><br>
<span style="background:white">2014-05-13 12:14:45 LOG: pid 15822: health check retry sleep time: 2 second(s)</span><br>
<span style="background:white">2014-05-13 12:14:46 LOG: pid 15857: connect_inet_domain_socket: select() timed out. retrying...</span><br>
<span style="background:white">2014-05-13 12:14:47 LOG: pid 15857: connect_inet_domain_socket: select() timed out. retrying...</span><br>
<span style="background:white">2014-05-13 12:14:47 DEBUG: pid 15822: retrying 1 th health checking</span><br>
<span style="background:white">2014-05-13 12:14:47 DEBUG: pid 15822: health check: clearing alarm</span><br>
<span style="background:white">2014-05-13 12:14:47 DEBUG: pid 15822: health_check: 0 th DB node status: 1</span><br>
<span style="background:white">2014-05-13 12:14:48 LOG: pid 15857: connect_inet_domain_socket: select() timed out. retrying...</span><br>
<span style="background:white">2014-05-13 12:14:48 ERROR: pid 15822: connect_inet_domain_socket: select() timed out</span><br>
<span style="background:white">2014-05-13 12:14:48 ERROR: pid 15822: make_persistent_db_connection: connection to 10.0.0.5(5432) failed</span><br>
<span style="background:white">2014-05-13 12:14:48 ERROR: pid 15822: health check failed. 0 th host 10.0.0.5 at port 5432 is down</span><br>
<span style="background:white">2014-05-13 12:14:48 DEBUG: pid 15822: health check: clearing alarm</span><br>
<span style="background:white">2014-05-13 12:14:48 DEBUG: pid 15822: health check: clearing alarm</span><br>
<span style="background:white">2014-05-13 12:14:48 LOG: pid 15822: health check retry sleep time: 2 second(s)</span><br>
<span style="background:white">2014-05-13 12:14:49 LOG: pid 15857: connect_inet_domain_socket: select() timed out. retrying...</span><br>
<span style="background:white">2014-05-13 12:14:50 LOG: pid 15857: connect_inet_domain_socket: select() timed out. retrying...</span><br>
<span style="background:white">2014-05-13 12:14:50 DEBUG: pid 15822: retrying 2 th health checking</span><br>
<span style="background:white">2014-05-13 12:14:50 DEBUG: pid 15822: health check: clearing alarm</span><br>
<span style="background:white">2014-05-13 12:14:50 DEBUG: pid 15822: health_check: 0 th DB node status: 1</span><br>
<span style="background:white">2014-05-13 12:14:51 LOG: pid 15857: connect_inet_domain_socket: select() timed out. retrying...</span><br>
<span style="background:white">2014-05-13 12:14:51 ERROR: pid 15822: connect_inet_domain_socket: select() timed out</span><br>
<span style="background:white">2014-05-13 12:14:51 ERROR: pid 15822: make_persistent_db_connection: connection to 10.0.0.5(5432) failed</span><br>
<span style="background:white">2014-05-13 12:14:51 ERROR: pid 15822: health check failed. 0 th host 10.0.0.5 at port 5432 is down</span><br>
<span style="background:white">2014-05-13 12:14:51 DEBUG: pid 15822: health check: clearing alarm</span><br>
<span style="background:white">2014-05-13 12:14:51 DEBUG: pid 15822: health check: clearing alarm</span><br>
<span style="background:white">2014-05-13 12:14:51 LOG: pid 15822: set 0 th backend down status</span><br>
<span style="background:white">2014-05-13 12:14:51 DEBUG: pid 15822: failover_handler called</span><br>
<span style="background:white">2014-05-13 12:14:51 DEBUG: pid 15822: failover_handler: starting to select new master node</span></span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I even tried setting health_check_timeout to 0 to see whether it defaults to TCP/IP timeout. No difference.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Shyalika<span style="color:black;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>