tcp_close during async accept

Jim Morris <>
Thu Jul 9 08:32:54 CEST 2009


Sorry I missed that. So the error does make it look like select is
being used, did you build the erlang from source or get a package?

I suspect that kernel poll is not actually being set because it is not
compiled in, and erl is reporting it being turned on when in fact it
is turned off.

./configure has some settings which should force kernel poll to be
compiled, presuming that the OS/X kernel supports it.
> ./configure --enable-kernel-poll
check the output to make sure it can find everything it needs to
enable that option.

 I did find that I had to set a few things to get certain features to
be compiled in even though they are meant to be default.

On Jul 8, 5:18 pm, Joel Reymont <> wrote:
> 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_...
> > 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. Seehttp://www.erlang.org/faq.html
> > erlang-questions (at) erlang.org
>
> ---
> 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