Health Check Failed
Error message
Health check failed: HTTP 503 Service Unavailable
Quick summary
The health check endpoint returns a non-200 response, so the load balancer or orchestrator stops sending traffic to the service.
Why this happens
The application is overloaded and cannot respond to health checks in time
The health check endpoint has a bug or is not implemented correctly
A dependency (database, cache) is down, and the health check reports it
The health check timeout is too short for the response time
Minimal example
livenessProbe:
httpGet:
path: /health
port: 8080
timeoutSeconds: 1 # too shortlivenessProbe:
httpGet:
path: /health
port: 8080
timeoutSeconds: 5 # more realisticThe health check timeout is too short (1s), causing failures under load. The fix increases it to 5 seconds.
How to diagnose
Call the health endpoint directly:
curl http://<host>/healthCheck the application logs for errors around the health check
Verify the health check configuration (path, port, timeout)
Test if dependencies are available and responding
How to fix
Fix the application error that causes the health check to fail
Increase the health check timeout or interval
Fix or restart the dependency that the health check depends on
Ensure the health endpoint returns 200 when the service is healthy
How to prevent
Keep health checks lightweight — do not perform expensive operations
Set appropriate timeouts based on expected response times
Monitor health check failure rates and alert on trends