[erlang-questions] Increase the handle limit

Dave Cottlehuber dave@REDACTED
Fri Oct 21 22:37:36 CEST 2011


On 21 October 2011 16:49, Peer Stritzinger <peerst@REDACTED> wrote:
[snip]
> Little program used to find limit and reason:
>
> -module(test_fds).
> -compile([export_all]).
>
> count() ->
>    count(1, []).
>
> count(N, Fds) ->
>    case file:open(integer_to_list(N), [write]) of
>        {ok, F} ->
>            count(N+1, [F| Fds]);
>        {error, Err} ->
>            [ file:close(F) || F <- Fds ],
>            {Err, N}
>    end.


On my built-from-source  Windows 7 x64 (32bit erlang of course):

Erlang R14B03 (erts-5.8.4) [source] [smp:2:2] [rq:2] [async-threads:0]

Eshell V5.8.4  (abort with ^G)
1> pwd().
C:/erlang/scripts
ok
2> c(limit).
{ok,limit}
3> limit:count().
{system_limit,1021}

HTH,
Dave



More information about the erlang-questions mailing list