[erlang-questions] 回复: ERL_MAX_PORTS has no effect

goofansu goofan.su@REDACTED
Sat Jul 13 15:04:35 CEST 2013


Hi, Anthony

Thank you for the explanation.

I tested on the VPS again and set `ulimit -n` to a number like 4096 takes effects.

I'm running Riak so cannot upgrade to R16B01 now.


Kind Regards,

--
goofansu


--  
Kind Regards
goofansu


在 2013年7月13日星期六,下午8:08,Anthony Ramine 写道:

> 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 (mailto:erlang-questions@REDACTED)
> > http://erlang.org/mailman/listinfo/erlang-questions
> >  
>  
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130713/6c4fee3b/attachment.htm>


More information about the erlang-questions mailing list