I
I
IonianWind2012-11-06 13:15:55
linux
IonianWind, 2012-11-06 13:15:55

How to defeat Error: accept EMFILE?

The problem is as follows:
It is worth node 0.8.14, a script is running that uses sockjs
The server was restarted, and now the following is constantly poured into the script log:

events.js:71
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: accept EMFILE
    at errnoException (net.js:769:11)
    at TCP.onconnection (net.js:1017:24)

After the reboot I put
ulimit -u 1048576
ulimit -n 1048576

These values ​​were before the reboot
Here is the output ulimit -aso far
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 509680
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1048576
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1048576
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

CentOS 6 x64
system Googled until I found a solution

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2012-11-06
@jcmvbkbc

Those. just typed in the root console?
ulimit affects the current application and its descendants, it does not affect other running applications and applications launched from other places.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question