[Gllug] DB connection / netstat wierdness

Richard Huxton dev at archonet.com
Tue Feb 3 19:37:28 UTC 2004


On Tuesday 03 February 2004 18:38, Daniel P. Berrange wrote:
> On Tue, Feb 03, 2004 at 06:01:59PM +0000, Richard Huxton wrote:
> > > If I look at the second app server which I rebooted with prejudice:
> > >
> > > app02# netstat -t -n -a |grep 5432 | grep 192.168.100.4 | wc -l
> > >    0
> >
> > Have you waited long enough for the TCP timeout to kick in here (usually
> > 1 hour plus IIRC). PG should notice the disconnect after TCP tells it the
> > connection is gone.
>
> You know, I thought I had but it turns out the default keepalive timeout
> is 2 hours on Linux. Rather more than is desirable when you're trying to
> bring back up an app servers after a crash. I'm going to tune
> /proc/sys/net/ipv4/tcp_keepalive_time to be 10 minutes instead and
> see how it goes.

If that's what it is, you're not the first to be caught by it. I'm guessing 
the TCP timeout is so long because once, long ago...
1. Data transmission speeds were slow, links unreliable ...
2. Over an hour is long enough to get down to the computer room, and make up a 
new cable ;-)

-- 
  Richard Huxton
  Archonet Ltd
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list