Max number of open file descriptors is too low
Tue Sep 27 16:16:53 CEST 2005
This won't work on Unix. Assuming that MAX_FILES() will return
ERL_MAX_PORTS, it will be reset back to FD_SETSIZE. I had this
problem on the Mac and had to edit header files.
Could this be a bug?
if ((max_files = MAX_FILES()) < 0)
erl_exit(1, "Can't get no. of available file descriptors\n");
/* Note: this is if MAX_FILES() differ from FD_SETSIZE which it */
/* does by deafult on e.g. BSDI */
#if defined(USE_SELECT) && defined(FD_SETSIZE)
if (max_files > FD_SETSIZE)
max_files = FD_SETSIZE;
On Sep 27, 2005, at 4:06 PM, Bengt Kleberg wrote:
> On 2005-09-27 15:46, Joel Reymont wrote:
>> Erlang hardcodes the maximum number of open file descriptors and
>> I think the default number is too low. At least on Windows it is.
>> Would the Erlang/OTP consider upping the number of descriptors on
>> Windows to something like 1024*8 or 1024*10?
> have you tried this:
> Open files, and sockets
> The maximum number of simultaneously open files and sockets
> depend on the maximum number of Erlang ports available, and
> operating system specific settings and limits.
> Open ports
> The maximum number of simultaneously open Erlang ports is by
> default 1024. This limit can be raised up to at most 268435456 at
> startup (see environment variable ERL_MAX_PORTS in erlang(3)) The
> maximum limit of 268435456 open ports will at least on a 32-bit
> architecture be impossible to reach due to memory shortage.
More information about the erlang-questions