[erlang-questions] Re: tcp_close during async accept

Joel Reymont <>
Thu Jul 9 02:18:21 CEST 2009


Jim,

Take a look at the Erlang prompt right below where ulimit -n gives  
10240, i.e.

>> Erlang R13B01 (erts-5.7.2) [source] [smp:2:2] [rq:2] [async-threads: 
>> 0]
>> [kernel-poll:true]

I thought this means I do have kernel poll enabled. I should since I  
pass +K.

The part that I'm surprised about is that select is still used.


On Jul 9, 2009, at 12:55 AM, Jim Morris wrote:

> Joel, one other thing to try is use [kernel-poll:true] by adding +K
> true to the erl command line, on both the client and server, see if
> that helps.
>
> I just double checked and I can open 1000 virtually simultaneous
> connections (sleep(1) between each open on client) using the code from
> http://www.trapexit.org/Building_a_Non-blocking_TCP_server_using_OTP_principles
> with no problems on my Linux box using +K true. (Haven't tried without
> that though).
>
>
>
> On Jul 8, 9:29 am, Joel Reymont <> wrote:
>> On Jul 8, 2009, at 4:45 PM, Trevor Woollacott wrote:
>>
>>> Thats true, running out of file descriptors is likely. If that is
>>> the case then you should be seeing EMFILE or ENFILE errors.
>>
>> This is not the case in my test, although I did report a related  
>> issue:
>>
>> Mac OSX 10.5.7
>>
>> ulimit -n
>> 10240
>>
>> Erlang R13B01 (erts-5.7.2) [source] [smp:2:2] [rq:2] [async-threads: 
>> 0]
>> [kernel-poll:true]
>>
>> =ERROR REPORT==== 6-Jul-2009::20:51:54 ===
>> driver_select(0x00000041, 1024, ERL_DRV_WRITE ERL_DRV_USE, 1) by
>> tcp_inet driver #Port<0.3137> failed: fd=1024 is larger than the
>> largest allowed fd=1023
>>
>> =ERROR REPORT==== 6-Jul-2009::20:51:55 ===
>> File operation error: system_limit. Target: s3erl/ebin/random.beam.
>> Function: get_file. Process: code_server.
>>
>> ---
>> Mac hacker with a performance benthttp://www.linkedin.com/in/joelreymont
>>
>> ________________________________________________________________
>> erlang-questions mailing list. Seehttp://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
>

---
Mac hacker with a performance bent
http://www.linkedin.com/in/joelreymont



More information about the erlang-questions mailing list