[erlang-questions] Increase the handle limit
Dave Cottlehuber
dave@REDACTED
Fri Oct 21 18:39:38 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 :
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}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111021/aafdd1a1/attachment.htm>
More information about the erlang-questions
mailing list