EMFILE: Too Many Open Files, and Why Raising ulimit Is Wrong

The quick fix is raising ulimit. The real question is what is holding thousands of descriptors open and never closing them.

EMFILE: Too Many Open Files, and Why Raising the Limit Is Usually Wrong. Abstract error autopsy illustration in orange and dark grey on debugly.dev
Ceiling Scope Where it lives
Soft limit Per process, adjustable at runtime ulimit -n, LimitNOFILE
Hard limit Per process, only root raises it ulimit -Hn
fs.file-max Whole system sysctl fs.file-max

Published on debugly.dev by Rohit Bhadani | Founder of Krova Cloud