tcp_close during async accept

Jim Morris <>
Thu Jul 9 01:55:50 CEST 2009


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


More information about the erlang-questions mailing list