[erlang-questions] 回复： ERL_MAX_PORTS has no effect
Sat Jul 13 15:19:54 CEST 2013
Setting the ulimit works nicely with files, but not so nice with sockets.
You wont notice until the driver start using driver_select and thereby, indirectly, using
the system call select.
I suspected that "erl +K true", enable kernel poll (kqueue for max os x), should do the trick. But, not.
There is still a check for max_fds that triggers somewhere which is unfortunate.
This is on R15, have not checked R16 yet.
Rickard Green may now more about the status on max_fds ?
On 13 jul 2013, at 15:04, goofansu <goofan.su@REDACTED> wrote:
> 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,
> Kind Regards
> 在 2013年7月13日星期六，下午8:08，Anthony Ramine 写道：
>> 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.
>> 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).
>>> The max_fds is always 1024.
>>> Kind Regards
>>> erlang-questions mailing list
> erlang-questions mailing list
"Installing applications can lead to corruption over time. Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions