"Too many open files" Error
- Determine what computer it occurs on
- Determine the process locking the files (on Linux use lsof, on Windows you can use handle or TCPView for listing sockets) and the files list
- If the number is not large, check the OS and the process limits on the file handles (on Linux use ulimit -n) and increase them if necessary. Please note that default Linux 1024 handles per process is way too small for a server application like TeamCity. Please increase the number to at least 16000. Please check the actual process limits after the change as there are different settings in the OS for settings global and per-session limits (e.g. see the post)
If the number of files is large and looks suspicions and the locking process is a TeamCity one (the TeamCity agent or server with no other web applications running), then, while the issue is still occurring, grab the list of open handles several times with several minutes interval and send the result to us for investigation together with the relevant details.
Please note that you will most probably need to reboot the machine with the error after the investigation to restore normal functioning of the applications.
Please sign in to leave a comment.