Subject: Re: TCP connection will hang in FIN_WAIT1 after closing if zero window is advertised

From: Andrey Dmitrov <[email-masked]>
Date: Tue, 16 Sep 2014 13:29:16 +0400

On 15/09/14 23:43, Neal Cardwell wrote:
> On Mon, Sep 15, 2014 at 12:11 PM, Andrey Dmitrov
> <[email-masked]> wrote:
>> It is possible to create a lot of connections in the same manner which will be in FIN_WAIT1 state forever.
> ...
>> After ~10 minutes you will see 500 connections in the FIN_WAIT1 state on the host_A:
>> netstat | grep FIN_WAIT1 | wc -l
>> 500
> Thanks for the report. In your tests, have you ever seen the number of
> such connections exceed net.ipv4.tcp_max_orphans?
>
> Can you set net.ipv4.tcp_max_orphans to a low value and verify that it
> limits the number of such connections? AFAICT it should.
I tried to set net.ipv4.tcp_max_orphans to 100, it limits the 
connections number. As I saw net.ipv4.tcp_max_orphans can be exceeded, 
but for a short time. Maximum connections number in FIN_WAIT1 state was 
196, after that it was decreased rather fast to ~100.

Thanks,
Andrey