Interview Prep/CI/CD/Jenkins Credentials, Plugins and Controller Issues

`java.lang.OutOfMemoryError: Java heap space` on the controller.

IntermediateTroubleshootingJenkins Credentials, Plugins and Controller Issues
Answer

Likely causes → Heap too small for job count; memory leak in a plugin; massive pipeline logs.

Diagnose → Take a heap dump (jcmd <pid> GC.heap_dump /tmp/h.hprof) and inspect with Eclipse MAT; check JAVA_OPTS.

Fix → Increase -Xmx, remove the leaking plugin, reduce build retention.

Prevent → Alert on heap utilisation and old gen GC time.

All CI/CD questions

More on Jenkins Credentials, Plugins and Controller Issues