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.
| 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