-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
erlang with > 1024 max open files / sockets #6143
Comments
Hi, I've updated erlang formula. Can you put a file from this gist to Cheers! |
Is this still an issue with 15B? |
yes. |
Has anyone reported this issue upstream to Erlang itself? |
FWIW I don't see MacPorts doing anything here? |
Can't seem to install 15B1 either |
Would review a new pull-request for this issue, but we will want a link to an upstream bug report containing the patch. While I agree that limiting the file descriptors is a problem, we don't like carrying unsourced patches if at all possible. |
FWIW this has been addressed in R16B01 anyway now -- search for |
To enable erlang on OSX to open more than 1024 files or sockets (regardless what ulimit -n says)
erlang must be compiled with -DFD_SETSIZE=10000 and -DDARWIN_UNLIMITED_SELECT.
So adding CFLAGS="-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT" to the ./configure parameters
in /usr/local/Library/Formula/erlang.rb enables erlang to open 10000 files or sockets simultaneously
(if ulimit -n is also set to at least 10000).
This is caused by https://github.com/erlang/otp/blob/dev/erts/emulator/sys/common/erl_poll.c line 2186
becuase max_fds is set to FD_SETSIZE, and it is limited to 1024 for OSX.
See:
http://erlang.2086793.n4.nabble.com/clipping-of-max-of-file-descriptors-by-erts-when-kernel-poll-is-enabled-td2108706.html
It is quite nasty testing or running an erlang server that accepts tcp connection when it is limited to 1024
connections. when erlang was compiled with that two flags it worked fine for me.
The text was updated successfully, but these errors were encountered: