Max number of open file descriptors is too low

Joel Reymont <>
Tue Sep 27 16:24:48 CEST 2005

It seems that on Windows max_files in erts/emulator/sys/win32/sys.c  
is just preset at 1024.

I see the following at the top of the file:

static int max_files = 1024;

I see sys_max_files() that returns the value of max_files and I see  
max_files being used all over the place. I do not see any functions  
that could be used by Erlang to set max_files to the value of  

It looks like a bug to me. If the intention was to set max_files to  
ERL_MAX_PORTS then there's no code in the emulator bootstrapping  
functions to do so.


On Sep 27, 2005, at 4:06 PM, Bengt Kleberg wrote:

> 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 mailing list