The whole host can't open files: `VFS: file-max limit 98304 reached` in `dmesg`.
AdvancedTroubleshootingProcesses, memory and OOM
Answer
Likely causes → The system-wide file handle limit was reached, usually by one leaking process.
Diagnose →
cat /proc/sys/fs/file-nr # allocated unused max
for p in /proc/[0-9]*; do echo "$(ls $p/fd 2>/dev/null | wc -l) $(cat $p/comm 2>/dev/null)"; done | sort -rn | head
Fix → Restart the leaking process. Raise the limit if needed: sysctl -w fs.file-max=2097152, persisted in /etc/sysctl.d/.
Prevent → Alert on file-nr usage; set per-service LimitNOFILE so one process can't take everything.
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>`.BeginnerZombie count keeps climbing into the thousands and new processes fail with `fork: Resource temporarily unavailable`.AdvancedAn 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`.Intermediate