Subversion Indexer Paused with "Too many open files" Error
While indexing or building bamboo displays Too many open files error
Bamboo has hit the the maximum permitted number of open files in Linux/UNIX operating systems.
Increase the permitted number of open file handles for the Bamboo user and/or whole system. These setting may vary between operating systems, so you may need to talk to your system administrator or do your own research. We'll describe the most common approach to troubleshooting and fixing this problem.
In general, there are two limits to the the number of file handles that will affect Bamboo: the total number of file handles allowed on the system, and the number of file handles allowed per process for the user that runs Bamboo.
Currently Bamboo can hold a high number of open file handles, exceeding common per-process default limits of 1000 to 4000 open files. At this point we recommend that if you're experiencing issues, increase this limit to 40000. The total number of file handles allowed on the whole system is usually set high enough by default, but on a heavily loaded system may also need to be increased.
Setting the permitted number of file handles per process
To check the number of currently open file handles, run
sudo lsof -u Bamboo_USER (restricted to the Bamboo running user) or
sudo lsof -p Bamboo_PROCESS (restricted to the Bamboo process).
To check the permitted number of file handles per process, run
To modify the permitted number of file handles per process, edit
/etc/security/limits.conf and add (replacing Bamboo_USER with the name of the user running Bamboo or * for all users):
Bamboo_USER soft nofile 40000 Bamboo_USER hard nofile 40000
Setting the permitted number of file handles over the whole system
To check the number of open file handles, run
To check the total number of open file permitted in the whole system, run
To modify the total number of open file permitted in the whole system, edit
/etc/sysctl.conf and add the line:
fs.file-max = 65535
PS: After making these changes you need to reboot your OS.