Container exited unexpectedly
April 30, 2026 · View on GitHub
Playbook ID: container-crash
Category: deploy
Severity: high
Tags: container, crash, oomkilled, exit-code, kubernetes, docker
What this failure means
The container started but then exited with a non-zero status code. If it keeps restarting, Kubernetes enters CrashLoopBackOff and the pod never becomes ready.
Common log signals
container exited with
exit code 1
exit code 139
container is restarting
Diagnosis
The container started but then exited with a non-zero status code. If it keeps restarting, Kubernetes enters CrashLoopBackOff and the pod never becomes ready.
CrashLoopBackOff is the platform symptom. The root cause is usually in the last container logs, the exit code, or the startup configuration passed to the image.
Fix steps
- Retrieve the logs from the previous crashed container:
kubectl logs <pod> --previous. - Check the exit code with
kubectl describe pod <pod>— look for the Last State block. - If exit 137, increase the memory limit in the container spec or profile memory usage.
- If exit 139, inspect the logs for segfaults or crashes in native extensions.
- If exit 1, search the log output for
FATAL,panic, or unhandled exception traces. - Reproduce the failure locally with
docker runusing the same image and environment variables.
Validation
- Re-run the failing workflow step.
- Confirm the original failure signature for Container exited unexpectedly is gone.
Likely files to inspect
Dockerfilek8s/**/*.yamldeploy/**/*.yamldocker-compose*.yml
Run Faultline
faultline analyze build.log
faultline explain container-crash
faultline workflow build.log --json --mode agent
Search phrases this page answers
- Container exited unexpectedly
- Deploy: container exited unexpectedly
- container is restarting
- faultline explain container-crash
- Kubernetes container exited unexpectedly
Generated from playbooks/bundled/log/deploy/container-crash.yaml. Do not edit directly — run make docs-generate.