[erlang-questions] tcp_close during async accept

Trevor Woollacott trevorw@REDACTED
Wed Jul 8 17:45:58 CEST 2009


Thats true, running out of file descriptors is likely. If that is the case 
then you should be seeing EMFILE or ENFILE errors.

I had assumed that the TIME_WAIT period wouldn't be a problem because you 
are using SO_REUSEADDR in the listener. But I suppose it could be a problem 
if the clients have their ports defined manually. For example, if the client 
on PORT A is connected to the remote server on PORT B, and then the 
connection closes, the client will still be in TIME_WAIT state. The same 
client on PORT A will not be able to reconnect to the servers remote address 
until the TIME_WAIT state is over, even with SO_REUSEADDR.

The best thing to do is snoop the network traffic to see exactly what is 
going on.

----- Original Message ----- 
From: "Valentin Micic" <v@REDACTED>
To: "'Trevor Woollacott [ MTN - Innovation Centre ]'" <Woolla_T@REDACTED>; 
"'Joel Reymont'" <joelr1@REDACTED>
Cc: <erlang-questions@REDACTED>
Sent: Wednesday, July 08, 2009 2:41 PM
Subject: RE: [erlang-questions] tcp_close during async accept


> In my experience, a backlog value is rarely an issue in practice (although
> testing may be another matter). What's more often a problem when you do
> high-volume testing is number of file descriptors (e.g. maybe you did 
> change
> it in ERTS but not at kernel level, or vice-versa), or even value for
> TIME_WAIT period etc. What makes you believe that the problem is with
> backlog?
>
> V.
>
> -----Original Message-----
> From: erlang-questions@REDACTED [mailto:erlang-questions@REDACTED] On
> Behalf Of Trevor Woollacott [ MTN - Innovation Centre ]
> Sent: 08 July 2009 12:45 PM
> To: Joel Reymont
> Cc: erlang-questions@REDACTED
> Subject: RE: [erlang-questions] tcp_close during async accept
>
> I'm not sure for Max OSX, but I think it is 128. Although that wouldn't
> explain why only half of your 700 connections are successful. Maybe there 
> is
> a fudge factor involved in the calculation of the actual backlog value, or
> maybe the listener process isn't accepting connections quickly enough?
> I know for Windows Sockets 1.1 the maximum value is 5, and some versions 
> of
> Windows (such as Windows 2000 Server) allow a backlog value of up to 200.
>
>> -----Original Message-----
>> From: Joel Reymont [mailto:joelr1@REDACTED]
>> Sent: Tuesday, 07 July 2009 04:31 PM
>> To: Trevor Woollacott [ MTN - Innovation Centre ]
>> Cc: Erlang Users' List
>> Subject: Re: [erlang-questions] tcp_close during async accept
>>
>>
>> On Jul 7, 2009, at 12:10 PM, Trevor Woollacott [ MTN - Innovation
>> Centre ] wrote:
>>
>> > What OS are you using? Maybe the maximum backlog on your platform is
>> > less than 1024?
>>
>>
>> Mac OSX 10.5.7
>>
>> ---
>> Mac hacker with a performance bent
>> http://www.linkedin.com/in/joelreymont
>
>
> NOTE: This e-mail message is subject to the MTN Group disclaimer see
> http://www.mtn.co.za/SUPPORT/LEGAL/Pages/EmailDisclaimer.aspx
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org 



More information about the erlang-questions mailing list