Docs / Troubleshooting / How to Fix "Too Many Open Files" Error

How to Fix "Too Many Open Files" Error

By Admin · Feb 25, 2026 · Updated Apr 24, 2026 · 367 views · 1 min read

This error means your server has hit the file descriptor limit.

Check Current Limits

ulimit -n\ncat /proc/sys/fs/file-nr

Increase for a Service

Edit the systemd service file or create an override:

systemctl edit nginx

Add:

[Service]\nLimitNOFILE=65535

Increase System-Wide

Edit /etc/security/limits.conf:

* soft nofile 65535\n* hard nofile 65535

Edit /etc/sysctl.conf:

fs.file-max = 65535
sysctl -p

Was this article helpful?