The Jenkins UI returns 503 and then "Jenkins is going to shut down"; the controller log shows `java.lang.OutOfMemoryError: Java heap space`.
IntermediateTroubleshootingPipeline outages
Answer
Likely causes → The controller is overloaded: builds run on the built-in node, thousands of retained builds and huge console logs are loaded into memory, or a plugin leaks memory. Heap is often still at a default that's too small.
Diagnose →
grep -i 'outofmemory' /var/log/jenkins/jenkins.log | tail
ls /var/lib/jenkins/jobs | wc -l
du -sh /var/lib/jenkins/jobs/*/builds | sort -h | tail
jcmd $(pgrep -f jenkins.war) GC.heap_info
Fix → Restart with a larger heap (JAVA_OPTS=-Xmx4g -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError), set the built-in node's executors to 0 so builds only run on agents, and discard old builds.
Prevent → Treat the controller as a scheduler only, keep build retention short, review plugins, back up JENKINS_HOME, and monitor heap via the Prometheus metrics plugin.
More on Pipeline outages
Every GitHub Actions job in the org sits at "Waiting for a runner to pick up this job..." for 30 minutes.BeginnerJenkins builds on one agent fail with "java.io.IOException: No space left on device" while checking out code.BeginnerA deploy workflow that worked yesterday fails at `aws-actions/configure-aws-credentials` with "Not authorized to perform sts:AssumeRoleWithWebIdentity".IntermediateEvery pipeline in the company fails at the dependency step with "npm ERR! 503 Service Unavailable" (or PyPI/Maven timeouts) because an upstream registry is having an outage.Intermediate`terraform apply` in CI fails with "Error acquiring the state lock: ConditionalCheckFailedException" and shows a lock from a pipeline run that was cancelled two hours ago.BeginnerArgo CD shows the `payments` app permanently `OutOfSync` and self-heal keeps fighting: replicas jump between 3 and 12 every few minutes.Intermediate