Zombie count keeps climbing into the thousands and new processes fail with `fork: Resource temporarily unavailable`.
AdvancedTroubleshootingProcesses, memory and OOM
Answer
Likely causes → Zombies hold PIDs; the user or system has hit pids.max, ulimit -u (nproc), or kernel.pid_max.
Diagnose →
ps -eo stat | grep -c Z
cat /proc/sys/kernel/pid_max
ulimit -u
systemctl show app -p TasksMax -p TasksCurrent
Fix → Restart the parent that isn't reaping (frees all its zombies at once). Temporarily raise TasksMax= or nproc only if the load is legitimate.
Prevent → Fix the reaping bug; alert on zombie count and task counts per service.
More on Processes, memory and OOM
A Java service disappears without an error in its own log. `dmesg` shows `Out of memory: Killed process 4121 (java) total-vm:... anon-rss:...`.BeginnerA service gets killed with `Memory cgroup out of memory: Killed process ...` but the host has 20 GB free.Intermediate`ps` shows dozens of processes in state `Z` with `<defunct>`.BeginnerAn app crashes under load with `java.io.IOException: Too many open files` (or `EMFILE`).BeginnerYou raised `nofile` in `/etc/security/limits.conf` to 65536, but the service still shows `Max open files 1024`.IntermediateThe whole host can't open files: `VFS: file-max limit 98304 reached` in `dmesg`.Advanced