Re: Psql or test application hangs when interface is down for the DB server

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: <valiouk(at)yahoo(dot)co(dot)uk>
Cc: "ext Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "K\, Niranjan \(NSN - IN\/Bangalore\)" <niranjan(dot)k(at)nsn(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Psql or test application hangs when interface is down for the DB server
Date: 2008-07-16 17:33:23
Message-ID: 87wsjl4tuk.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


"Valentin Bogdanov" <valiouk(at)yahoo(dot)co(dot)uk> writes:

> I have noticed this as well. Blocks in poll(), timeout parameter -1,

Oh good point. non-blocking sockets and poll/select let you control the
timeout too.

> meaning infinite then after 4 minutes on my system poll() returns 1 and
> getsockopt() is called with SO_ERROR. SYN packets are tried only for the
> default tcp timeout of 20 seconds.

Uhm, 20 seconds would be an unreasonably low default. I think the RFCs mandate
timeouts closer to the 4 minutes you describe.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Valentin Bogdanov 2008-07-16 22:45:23 Re: Psql or test application hangs when interface is down for the DB server
Previous Message Valentin Bogdanov 2008-07-16 14:52:50 Re: Psql or test application hangs when interface is down for the DB server