Mastodon

oooops.dev

DevOps is hard

File Limits and how the “Too many open files” error can pop up unexpectedly — January 17, 2021

File Limits and how the “Too many open files” error can pop up unexpectedly

I have recently come across a nasty Too many open files error, and noticed the information on the internet about what that might mean or how to solve it doesn’t always paint a clear picture.

Here I try to put together a more complete guide by gathering all the resources I found as I was dealing with the issue myself.

What are file limits and file descriptors?

In Unix-like systems, each process is associated with sets of usage limits, which specify the amount of system
resources they can use. One of those is the limit of open file descriptors (RLIMIT_NOFILE).

But what is a file descriptor?

Continue reading