Interview Prep/Jenkins/Controller health, disk & upgrades

`java.io.IOException: Too many open files` in the controller log

AdvancedTroubleshootingController health, disk & upgrades
Answer

Likely causes → Low file descriptor limit for the Jenkins process, or a leak from a plugin keeping files/sockets open.

Diagnose → cat /proc/$(pgrep -f jenkins.war)/limits | grep 'open files' and ls /proc/<pid>/fd | wc -l; lsof -p <pid> | awk '{print $9}' | sort | uniq -c | sort -n | tail.

Fix → Raise limits (LimitNOFILE=65536 in systemd, container runtime ulimits); identify leaking files from lsof and update the plugin.

Prevent → Monitor open FDs.

All Jenkins questions Roadmap: Jenkins

More on Controller health, disk & upgrades