On 2010-12-09, Amos Jeffries <[email protected]> wrote:
>
> TIME_WAIT are FD which have been finished with but are in a TCP timeout
> in case there are stray packets still somewhere in the network. Somewhat
> around 5 minutes IIRC. Sockets (FD) cannot be re-used until there is no
> chance of stray packets corrupting the next TCP connection to use them.
F.ex. by putting the following into /etc/sysctl.conf:
net.ipv4.tcp_fin_timeout = 30
And maybe also extend the ephemeral port range:
net.ipv4.ip_local_port_range = 16384 61000
and activate by "sysctl -p".
-jf