[pgpool-hackers: 1572] Re: Pgpool Hangs connections when shutting down interface of the secondary

Tatsuo Ishii ishii at postgresql.org
Fri May 20 11:30:40 JST 2016


Do you enable watchdog? If yes, can you do the same test with watchdog
disabled and see what happens?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Of course not. I shut down the interface. But the point of it is, I would
> expect pgpool to mark node 2 as down, and that is not happening.
> Thanks for your answers Tatsuo.
> Regards!
> On May 19, 2016 11:11 PM, "Tatsuo Ishii" <ishii at postgresql.org> wrote:
> 
>> So if you run psql on the node 1, can it connect to PostgreSQL (not
>> via pgpool) on node 2?
>>
>> Best regards,
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese:http://www.sraoss.co.jp
>>
>> > Hey Tatsuo
>> > The initial situation is that node 1 is master node for pgpool and
>> primary
>> > node for postgres. Node 2 is standby node for pgpool and slave for
>> > postgres. If I shut down the interface on the slave/standby mode, next
>> time
>> > I try to connect to postgres through pgpool, the connections just hang. I
>> > would think this would be pretty repeatable, but it looks like no one
>> else
>> > is having this issue?
>> > Thanks.
>> > Regards
>> > On May 19, 2016 10:36 PM, "Tatsuo Ishii" <ishii at postgresql.org> wrote:
>> >
>> >> I just want to make sure. I assume psql is running on the same machine
>> >> as pgpool is running on. Am I correct? I am asking because it sounds
>> >> ridiculous that psql can connect to the PostgreSQL server which its
>> >> network interface is down.
>> >>
>> >> Best regards,
>> >> --
>> >> Tatsuo Ishii
>> >> SRA OSS, Inc. Japan
>> >> English: http://www.sraoss.co.jp/index_en.php
>> >> Japanese:http://www.sraoss.co.jp
>> >>
>> >> > Hey Tatsuo, thanks for the feedback, I really appreciate it.
>> Connecting
>> >> > directly, it works.
>> >> > Thanks! Regards
>> >> > On May 19, 2016 9:24 PM, "Tatsuo Ishii" <ishii at postgresql.org> wrote:
>> >> >
>> >> >> If you directly connect to PostgreSQL on the server on which the
>> >> >> network interface was down using psql, does it fail or hang?
>> >> >>
>> >> >> Best regards,
>> >> >> --
>> >> >> Tatsuo Ishii
>> >> >> SRA OSS, Inc. Japan
>> >> >> English: http://www.sraoss.co.jp/index_en.php
>> >> >> Japanese:http://www.sraoss.co.jp
>> >> >>
>> >> >> > Hello Guys:
>> >> >> > i have posted this issue in pgpool-Users, but i got no answer. At
>> this
>> >> >> > point i am thinking about switching solutions as i cannot make mine
>> >> work,
>> >> >> > but i really like the idea of using pgpool, so i was wondering if i
>> >> could
>> >> >> > get an answer here. This is the issue i am experiencing:
>> >> >> >
>> >> >> > I am running pgpool 3.5.2 in a 2 node cluster with postgresql-9.5
>> in
>> >> >> > master-slave and streaming replication mode.
>> >> >> >
>> >> >> > I have been testing failover and failback for a while. While doing
>> >> >> failover
>> >> >> > by shutting down the processes, everything looks fine.
>> >> >> >
>> >> >> >
>> >> >> > The one test that is failing is when i shutdown the interface of
>> one
>> >> >> node.
>> >> >> > Right now i am shutting down the interface of the slave node (both
>> >> pgool
>> >> >> > slave and postgresql slave).
>> >> >> >
>> >> >> > The problem i am running into is that after doing this, all
>> >> connections
>> >> >> to
>> >> >> > my database (through pgpool) hang. i am testing it with psql, and
>> psql
>> >> >> just
>> >> >> > hangs and does not give me an output. When i bring the interface of
>> >> the
>> >> >> > slave back up, and try to connect to psql again, it looks like
>> pgpool
>> >> >> never
>> >> >> > marked the postgresql node as disconnected.
>> >> >> >
>> >> >> > I tried both with and without health check, and also tried with
>> >> different
>> >> >> > values of health_check_timeout. my connect timeout value is default
>> >> (10
>> >> >> > seconds).
>> >> >> >
>> >> >> > Any one has encountered this issue? I just dont see pgpool
>> attempting
>> >> to
>> >> >> do
>> >> >> > any failover. Pgpool is still running though, i can see the logs
>> still
>> >> >> > comming. I just never see an error.
>> >> >> >
>> >> >> > I am NOT using interface monitoring, and i would prefer not to use
>> it.
>> >> >> >
>> >> >> > Any pointers on how could i troubleshoot this?
>> >> >>
>> >>
>>
> 
> --001a114942f071445105333ca701
> Content-Type: text/html; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
> 
> <p dir="ltr">Of course not. I shut down the interface. But the point of it is, I would expect pgpool to mark node 2 as down, and that is not happening.<br>
> Thanks for your answers Tatsuo.<br>
> Regards!</p>
> <div class="gmail_quote">On May 19, 2016 11:11 PM, &quot;Tatsuo Ishii&quot; &lt;<a href="mailto:ishii at postgresql.org">ishii at postgresql.org</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So if you run psql on the node 1, can it connect to PostgreSQL (not<br>
> via pgpool) on node 2?<br>
> <br>
> Best regards,<br>
> --<br>
> Tatsuo Ishii<br>
> SRA OSS, Inc. Japan<br>
> English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
> <br>
> &gt; Hey Tatsuo<br>
> &gt; The initial situation is that node 1 is master node for pgpool and primary<br>
> &gt; node for postgres. Node 2 is standby node for pgpool and slave for<br>
> &gt; postgres. If I shut down the interface on the slave/standby mode, next time<br>
> &gt; I try to connect to postgres through pgpool, the connections just hang. I<br>
> &gt; would think this would be pretty repeatable, but it looks like no one else<br>
> &gt; is having this issue?<br>
> &gt; Thanks.<br>
> &gt; Regards<br>
> &gt; On May 19, 2016 10:36 PM, &quot;Tatsuo Ishii&quot; &lt;<a href="mailto:ishii at postgresql.org">ishii at postgresql.org</a>&gt; wrote:<br>
> &gt;<br>
> &gt;&gt; I just want to make sure. I assume psql is running on the same machine<br>
> &gt;&gt; as pgpool is running on. Am I correct? I am asking because it sounds<br>
> &gt;&gt; ridiculous that psql can connect to the PostgreSQL server which its<br>
> &gt;&gt; network interface is down.<br>
> &gt;&gt;<br>
> &gt;&gt; Best regards,<br>
> &gt;&gt; --<br>
> &gt;&gt; Tatsuo Ishii<br>
> &gt;&gt; SRA OSS, Inc. Japan<br>
> &gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
> &gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
> &gt;&gt;<br>
> &gt;&gt; &gt; Hey Tatsuo, thanks for the feedback, I really appreciate it. Connecting<br>
> &gt;&gt; &gt; directly, it works.<br>
> &gt;&gt; &gt; Thanks! Regards<br>
> &gt;&gt; &gt; On May 19, 2016 9:24 PM, &quot;Tatsuo Ishii&quot; &lt;<a href="mailto:ishii at postgresql.org">ishii at postgresql.org</a>&gt; wrote:<br>
> &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; If you directly connect to PostgreSQL on the server on which the<br>
> &gt;&gt; &gt;&gt; network interface was down using psql, does it fail or hang?<br>
> &gt;&gt; &gt;&gt;<br>
> &gt;&gt; &gt;&gt; Best regards,<br>
> &gt;&gt; &gt;&gt; --<br>
> &gt;&gt; &gt;&gt; Tatsuo Ishii<br>
> &gt;&gt; &gt;&gt; SRA OSS, Inc. Japan<br>
> &gt;&gt; &gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
> &gt;&gt; &gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
> &gt;&gt; &gt;&gt;<br>
> &gt;&gt; &gt;&gt; &gt; Hello Guys:<br>
> &gt;&gt; &gt;&gt; &gt; i have posted this issue in pgpool-Users, but i got no answer. At this<br>
> &gt;&gt; &gt;&gt; &gt; point i am thinking about switching solutions as i cannot make mine<br>
> &gt;&gt; work,<br>
> &gt;&gt; &gt;&gt; &gt; but i really like the idea of using pgpool, so i was wondering if i<br>
> &gt;&gt; could<br>
> &gt;&gt; &gt;&gt; &gt; get an answer here. This is the issue i am experiencing:<br>
> &gt;&gt; &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; &gt; I am running pgpool 3.5.2 in a 2 node cluster with postgresql-9.5 in<br>
> &gt;&gt; &gt;&gt; &gt; master-slave and streaming replication mode.<br>
> &gt;&gt; &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; &gt; I have been testing failover and failback for a while. While doing<br>
> &gt;&gt; &gt;&gt; failover<br>
> &gt;&gt; &gt;&gt; &gt; by shutting down the processes, everything looks fine.<br>
> &gt;&gt; &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; &gt; The one test that is failing is when i shutdown the interface of one<br>
> &gt;&gt; &gt;&gt; node.<br>
> &gt;&gt; &gt;&gt; &gt; Right now i am shutting down the interface of the slave node (both<br>
> &gt;&gt; pgool<br>
> &gt;&gt; &gt;&gt; &gt; slave and postgresql slave).<br>
> &gt;&gt; &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; &gt; The problem i am running into is that after doing this, all<br>
> &gt;&gt; connections<br>
> &gt;&gt; &gt;&gt; to<br>
> &gt;&gt; &gt;&gt; &gt; my database (through pgpool) hang. i am testing it with psql, and psql<br>
> &gt;&gt; &gt;&gt; just<br>
> &gt;&gt; &gt;&gt; &gt; hangs and does not give me an output. When i bring the interface of<br>
> &gt;&gt; the<br>
> &gt;&gt; &gt;&gt; &gt; slave back up, and try to connect to psql again, it looks like pgpool<br>
> &gt;&gt; &gt;&gt; never<br>
> &gt;&gt; &gt;&gt; &gt; marked the postgresql node as disconnected.<br>
> &gt;&gt; &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; &gt; I tried both with and without health check, and also tried with<br>
> &gt;&gt; different<br>
> &gt;&gt; &gt;&gt; &gt; values of health_check_timeout. my connect timeout value is default<br>
> &gt;&gt; (10<br>
> &gt;&gt; &gt;&gt; &gt; seconds).<br>
> &gt;&gt; &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; &gt; Any one has encountered this issue? I just dont see pgpool attempting<br>
> &gt;&gt; to<br>
> &gt;&gt; &gt;&gt; do<br>
> &gt;&gt; &gt;&gt; &gt; any failover. Pgpool is still running though, i can see the logs still<br>
> &gt;&gt; &gt;&gt; &gt; comming. I just never see an error.<br>
> &gt;&gt; &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; &gt; I am NOT using interface monitoring, and i would prefer not to use it.<br>
> &gt;&gt; &gt;&gt; &gt;<br>
> &gt;&gt; &gt;&gt; &gt; Any pointers on how could i troubleshoot this?<br>
> &gt;&gt; &gt;&gt;<br>
> &gt;&gt;<br>
> </blockquote></div>
> 
> --001a114942f071445105333ca701--


More information about the pgpool-hackers mailing list