Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Apr 2004 17:32:09 -0500 (CDT)
From:      Mike Silbersack <silby@silby.com>
To:        Brandon Erhart <berhart@ErhartGroup.COM>
Cc:        freebsd-net@freebsd.org
Subject:   Re: FIN_WAIT_[1,2] and LAST_ACK
Message-ID:  <20040404172904.M33929@odysseus.silby.com>
In-Reply-To: <6.0.2.0.2.20040404152043.01c83320@mx1.erhartgroup.com>
References:  <6.0.2.0.2.20040404152043.01c83320@mx1.erhartgroup.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 4 Apr 2004, Brandon Erhart wrote:

> Hello everyone,
>
> I am writing a network application that mirrors a given website (such as a
> suped-up "wget"). I use a lot of FDs, and was getting connect() errors when
> I would run out of local_ip:local_port tuples. I lowered the MSL so that
> TIME_WAIT would timeout very quick (yes, I know, this is "bad", but I'm
> going for sheer speed here), and it alleviated the problem a bit.

In 5.2, I added code which automatically recycles TIME_WAIT sockets so
that this problem doesn't happen.  That's one possible solution that that
sub-problem, but as you've solved it with the msl change it's hardly a
large enough reason to change.

> However, I have run into a new problem. I am getting a good amount of
> blocks stuck in FIN_WAIT_1, FIN_WAIT_2 or LAST_ACK that stick around for a
> long while. I have been unable to find must information on a timeout for
> these states. I came across a small patch that modified tcp_timer.c in
> /usr/src/sys/netinet. It changed line #484 (in FreeBSD 4.9-REL) from:

If you can recreate this problem frequently, could you try capturing a
connection "hanging" with tcpdump?  Perhaps there is a problem in our TCP
state engine that needs to be fixed.

Mike "Silby" Silbersack



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040404172904.M33929>