Error AtlasError Documentation and Resolution

Kubernetes liveness probe failed: stop unintended restart loops

Liveness probe failed:

A liveness probe failure says the kubelet's health check did not succeed. Once consecutive failures reach failureThreshold, Kubernetes terminates that container and applies its restart policy. Separate a real deadlock from a misconfigured or overly aggressive probe before changing thresholds, especially when the workload repeatedly restarts during startup.

Liveness probe failedHealth checks
Liveness probe failed:
  • The application is deadlocked or otherwise unable to make progress even though its main process is still running.
  • The liveness check uses an incorrect endpoint, port, executable, or expected health signal and therefore fails against an otherwise functioning application.
  • Initialization takes longer than the probe permits, causing Kubernetes to kill the process before it can finish starting.
  • A probe depends on an external service or becomes too slow under load, triggering restarts that worsen an outage instead of repairing local application health.
  1. Read kubectl describe pod POD -n NAMESPACE and correlate Unhealthy probe failures with Killing events and restart timestamps. A single warning below failureThreshold does not necessarily cause a restart. If the last termination is OOMKilled, investigate memory separately rather than attributing every restart to the probe.
  2. Inspect kubectl logs POD -n NAMESPACE -c CONTAINER --previous and the container's actual livenessProbe. Check HTTP path, port and scheme, or the exact exec command and its exit status. Use the response text in the event to distinguish a failed application check from a connectivity or command problem.
  3. Measure worst-case initialization time. When startup is legitimately slow, configure a startup probe with enough time for initialization before liveness checks take over. Increasing a liveness delay without checking the startup sequence can leave failures undetected for longer without solving the real configuration problem.
  4. Make liveness measure a local failure that a restart can reasonably repair. Put temporary dependency availability or traffic eligibility checks in readiness where appropriate. Restarting every replica because a shared database is down can add load and prolong recovery.
  5. Adjust timeout and failure thresholds using observed health latency and failure tolerance, then roll out the change carefully. Confirm successful startup, stable restart counts, and normal behavior under representative load. Do not simply remove liveness protection or make it always succeed without understanding what failure detection would be lost.
Kubernetes documentation: configure liveness and startup probes