[erlang-questions] Increase the handle limit
Joel Reymont
joelr1@REDACTED
Fri Oct 21 21:59:32 CEST 2011
On Oct 21, 2011, at 8:48 PM, Tim Watson wrote:
> Is the gist of this is that select() has a size limit (1024) which has nothing to do with the OS limit on how many file handles you can open at a time? I think Erlang still uses select on a number of platforms and IIRC kqueue on OS-X is somehow broken so Erlang is still using select() on the mac.
It seems that ERTS_POLL_USE_SELECT is defined on the Mac, although +K true is also accepted.
This causes the following block in erts_poll_init() of erts/emulator/sys/common/erl_poll.c to be triggered
#if ERTS_POLL_USE_SELECT && defined(FD_SETSIZE)
if (max_fds > FD_SETSIZE)
max_fds = FD_SETSIZE;
#endif
This really should NOT be a compile-time setting.
It should check to see if kernell poll, etc. are enabled at runtime and only clip max_fds if they are not.
--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------
More information about the erlang-questions
mailing list