What is the indication of async-threads when starting iex?

What is it what you want to do? Not how you suspect to be able to do it, but what itself is the problem you are attempting to solve? (See the XY problem)

5 Likes

No. I just appended fs.file-max=500000 to /etc/sysctl.conf and reloaded the conf.
ulimit -n prints 1024

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) 256977
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) 256977
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

Given you require SNMP using the SNMP library would make more sense imho. Note: Erlang distributes with a SNMP library. See http://erlang.org/doc/apps/snmp/index.html

However the error you posted “emfile errors” is directly related to file descriptors. I would still give "ulimit -n unlimited’ and restarting iex another go before changing directions.

1 Like

My problem solved by ulimit. Thank you. By the way, I know that this solution (calling system.cmd) is not efficient at all. I have tried to use Erlang SNMP library but the usage is not really straightforward and has lo’s of difficulties. I’m now testing community SNMP libraries.
Thank you all.

1 Like

Glad you solved your problem.

IMO you should always go the extra mile to use libraries even if that means you have to fix them along the way. Spawning OS processes is awfully inefficient. Using an in-process library will enable you to do much more work per second. But yeah, sometimes business pressure makes this impossible.

1 Like