Erlang "system_limit" trouble!

zabrane Mikael zabrane3@REDACTED
Mon May 31 12:20:16 CEST 2010


Hi guys,

One of my modules ("report.erl") generates a lot  (~100K) of daily reports
on disk.
I'm facing an issue with the following code:

create_disk_report(Path, Bin) ->
  ok = file:write_file(Path, Bin).

...
{"init terminating in
do_boot",{{badmatch,{error,system_limit}},[{report,create_disk_report,2}
...}}

"file:write_file" doesn't seem to return "ok" in my case (it returns {error,
system_limit)}.

I even tried:
ok = file:write_file(Path, Bin, [write, raw, binary]).

But it fails too, and the same error persist.
What am i doing wrong guys?


My config
--------------
Exactly the same error appears on both OSX and Linux.

1) OSX 10.5.8
* Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:0]
[kernel-poll:false]
* gcc version 4.0.1 (Apple Inc. build 5488)
* OS ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) 6144
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 4096
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 266
virtual memory          (kbytes, -v) unlimited

2) Ubuntu 9.04 (jaunty)
* Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:0]
[hipe] [kernel-poll:false]
* gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
* ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

3) OpenSuSE
* Erlang R13B03 (erts-5.7.4) [source] [smp:2:2] [rq:2] [async-threads:0]
[hipe] [kernel-poll:false]
* gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revision 150839]
* ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 24242
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) 2642732
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 24242
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

-- 
Regards
Zabrane


More information about the erlang-questions mailing list