Too Many Files Open Error

Document created by dprostko on Jun 13, 2011Last modified by Adam Arrowsmith on Sep 23, 2016
Version 3Show Document
  • View in full screen mode


You are receiving a “Too many files open” error in Linux.



This error is caused by a kernel setting which limits how many files the system and user can have open concurrently.



To check how many filehandles your atom process is using, first find its process id, then use the command, lsof, and count the lines.


$ ps auxww | grep java
$ lsof -p <PID> | wc -l

It may be useful to know how many filehandles your system is allowed to open. Use the following command to check this value:


$ cat /proc/sys/fs/file-max


In order to increase this value, edit the file, /etc/sysctl.conf, look for the variable, fs.file-max, and increase its value. Run the following command to make your change take effect:



$ sysctl -p

Now, you may also need to increase the number of filehandles available to the user running the atom process. For Linux systems running PAM, you will need to edit the file, /etc/security/limits.conf. The format of this file is as follows:


<domain> <type> <item> <value>


Per the Atom Cloud installation checklist (Linux), for a cloud, we recommend setting the value of nofile to 8192, but depending on your specific situation, you could increase this much higher if necessary.


So, to set the number of allowed open filehandles for the user "boomi" you might add a line similar to this:


boomi hard nofile 8192


3 people found this helpful