[erlang-questions] ERL_MAX_PORTS has no effect

Anthony Ramine n.oxyde@REDACTED
Sat Jul 13 14:08:39 CEST 2013


Hello,

ERL_MAX_PORTS sets the maximum number of running ports. Not the maximum number of file descriptors.

I guess you are running OS X which has a broken poll implementation and Erlang is forced to use select(), which is limited to FD_SETSIZE file descriptors. Fortunately, OS X's select() implementation can also be made to support an infinite number of file descriptors through a macro which I taught Erlang/OTP to use. Upgrade to R16B01 and you should be fine.

Regards, 

-- 
Anthony Ramine

Le 13 juil. 2013 à 08:34, goofansu a écrit :

> I encounted "fd=1024 is larger than the largest allowed fd=1023", then I set the ERL_MAX_PORTS variable when start the erlang vm. But it takes no effect.
> 
> $ erl -env ERL_MAX_PORTS 4096
> 
> Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] [kernel-poll:false]
> 
> Eshell V5.9.1  (abort with ^G)
> 1> erlang:system_info(check_io).
> [{name,erts_poll},
>  {primary,select},
>  {fallback,false},
>  {kernel_poll,false},
>  {memory_size,6344},
>  {total_poll_set_size,2},
>  {lazy_updates,true},
>  {pending_updates,0},
>  {batch_updates,false},
>  {concurrent_updates,false},
>  {max_fds,1024}]
> 2>
> 
> The max_fds is always 1024.
> 
> -- 
> Kind Regards
> goofansu
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list