Resource Limit Exhaustion

Fix "Too many open files", "fork: retry: Resource temporarily unavailable", "inotify watch limit reached" and "cannot create thread" errors. Read the limits of the running process in /proc/PID/limits, never your shell's ulimit, because systemd units ignore limits.conf and PAM. Separate the layers: per-process nofile (LimitNOFILE), system-wide fs.file-max and fs.nr_open (ENFILE versus EMFILE), nproc and TasksMax from the cgroup, kernel.pid_max and threads-max, inotify max_user_watches and max_user_instances. Count use, decide leak versus legitimate growth by whether it plateaus, then raise the limit in a unit drop-in or sysctl.d and re-read the limits after restart. Use when a service hits a count limit. Not for security sysctls (host-hardening), fixing the leak in code (debugging) or memory limits (oom-kill-forensics).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit 002f16a703

Frequently asked questions

npx get-skill add greenblacked/resource-limit-exhaustion