Calculate open file descriptor usage against system and per-process ulimit thresholds.
Linux enforces two separate file descriptor ceilings: a per-process soft/hard limit set by ulimit -n (or /etc/security/limits.conf), and a system-wide ceiling set by the fs.file-max sysctl. A process hitting its per-process limit gets 'too many open files' errors even if the system as a whole has plenty of headroom, and vice versa — both usage percentages should be watched independently.
FD usage percentage
usage% = open_fds / max_fds × 100
This error occurs when a process attempts to open a new file, socket, or pipe after already reaching its file descriptor limit (ulimit -n) — common in high-concurrency servers handling many simultaneous connections.
Set soft/hard limits in /etc/security/limits.conf (or a systemd unit's LimitNOFILE= directive for services), then have the process re-login or restart to pick up the new ulimit -n value.
Increase fs.file-max via sysctl (sysctl -w fs.file-max=<value>, persisted in /etc/sysctl.conf), which caps the total file descriptors available to all processes on the host combined.