[158668] in North American Network Operators' Group

home help back first fref pref prev next nref lref last post

Re: TCP time_wait and port exhaustion for servers

daemon@ATHENA.MIT.EDU (Ray Soucy)
Thu Dec 6 12:21:00 2012

In-Reply-To: <50C0C8DA.1040007@vaxination.ca>
Date: Thu, 6 Dec 2012 12:18:17 -0500
From: Ray Soucy <rps@maine.edu>
To: Jean-Francois Mezei <jfmezei_nanog@vaxination.ca>
Cc: nanog@nanog.org
Errors-To: nanog-bounces+nanog.discuss=bloom-picayune.mit.edu@nanog.org

This issue is for really for connections that close properly and
without any issue.

The application closes the socket and doesn't care about it; but the
OS keeps it in the TIME_WAIT state as required by the RFC for TCP in
case data tries to be sent after the connection has closed (out of
order transmission).

I think we're going to go with dropping it to 30 seconds instead of 60
seconds and seeing how that goes.  It seems to be the direction taken
by people who have implemented high traffic load balancers and proxy
servers.

I was hoping someone would have real data on what a realistic time
window is for keeping a socket in a TIME_WAIT state, but it doesn't
seem like anyone has collected data on it.




On Thu, Dec 6, 2012 at 11:33 AM, Jean-Francois Mezei
<jfmezei_nanog@vaxination.ca> wrote:
> Question:
>
> If a TCP connection is left hanging and continues to hoard the port for
> some time before it times out, shouldn't the work to be focused on
> finding out why the connection is not properly closed instead of trying
> to support a greater number of hung connections waiting to time out ?
>
>
>



-- 
Ray Patrick Soucy
Network Engineer
University of Maine System

T: 207-561-3526
F: 207-561-3531

MaineREN, Maine's Research and Education Network
www.maineren.net


home help back first fref pref prev next nref lref last post