Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Okay, the problem is solved. It is a problem that will occur in every Linux server. So, if you are working with one of these, you need to read this.</p> <p>The reason was the default limit of files the Linux server had per each process.</p> <p>Seems that ever single linux server comes with this limitation of 1024 files opened by each process, you can check your limit with:</p> <pre><code># ulimit -n </code></pre> <p>To increase this number </p> <pre><code># ulimit -n 5000 (for example) </code></pre> <p>Each socket creates a new virtual file.</p> <p>For some reason my server was not displaying any error, the server just got frozen, stopping the log and no signal or evidence of anything. It was when I set up a copy of the server in another machine, when it started to send </p> <pre><code>warn: error raised: Error: accept EMFILE warn: error raised: Error: accept EMFILE warn: error raised: Error: accept EMFILE ... </code></pre> <p>Be careful because if you are not root, you will only change this for the current session and not permanently.</p> <p>Trick: If you want to cound the number of files, in this case, the number of files opened by your node process, take note of your process id and call this command.</p> <pre><code># ls -l /proc/XXXXX/fd | wc -l </code></pre> <p>Where XXXXX is the process id. This will help you to know if this is your problem, once you launch your node server, you can use this command to check if it reaches a top, and it stops growing after it gets frozen. (by default 1024 or "ulimit -n").</p> <p>If you only want to check which files are open by the process:</p> <pre><code># ls -l /proc/XXXXX/fd </code></pre> <p>Hope this can help you. Any way if you are setting up a node js server I'm pretty sure you want to do that to be sure it won't melt.</p> <p>Finally if you need help in future errors without log, you can try to <code>strace</code>ing or <code>dtruss</code>ing process</p> <pre><code># strace -p &lt;process-id&gt; </code></pre> <p>should do the job.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload