docker runtime_error ai_generated true

Container health status: unhealthy

ID: docker/healthcheck-unhealthy

Also available as: JSON · Markdown
82%Fix Rate
85%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
27 active

Root Cause

Container healthcheck failing. App may be starting slow or endpoint misconfigured.

generic

Workarounds

  1. 92% success Check healthcheck command matches actual app endpoint and port
    docker inspect --format='{{json .State.Health}}' container_name

    Sources: https://docs.docker.com/reference/dockerfile/#healthcheck

  2. 85% success Add start-period to allow for slow startup
    HEALTHCHECK --start-period=30s --interval=10s CMD curl -f http://localhost:8080/health

    Sources: https://docs.docker.com/reference/dockerfile/#healthcheck

Dead Ends

Common approaches that don't work:

  1. Remove healthcheck entirely 80% fail

    Orchestrator can't detect failures, routes traffic to dead containers

  2. Set very long timeout/interval 55% fail

    Delays failure detection, slow recovery

Error Chain

Frequently confused with: