Interview Prep/Jenkins/Controller health, disk & upgrades

Controller crashes with `java.lang.OutOfMemoryError: Java heap space`

IntermediateTroubleshootingController health, disk & upgrades
Answer

Likely causes → Heap too small for the workload, too many retained builds, huge pipelines (many steps), giant logs, or a plugin leak.

Diagnose → Heap dump from -XX:+HeapDumpOnOutOfMemoryError analysed with Eclipse MAT; GC logs; recent plugin changes.

Fix → Short term: restart with more heap (-XX:MaxRAMPercentage=75 and a larger container limit). Then fix the cause: discard old builds, reduce step counts, upgrade/remove the leaking plugin.

Prevent → Alert on heap usage after GC above 80%.

All Jenkins questions Roadmap: Jenkins

More on Controller health, disk & upgrades