LocalStackDocker

LocalStack health check timeout causes false unhealthy status

warning
availabilityUpdated Jul 24, 2024(via Exa)
How to detect:

LocalStack's default Docker health check timeout of 5 seconds is insufficient for the health check endpoint to respond, causing Docker to mark the container as unhealthy (ExitCode -1) in approximately 10% of container starts. All services report 'available' in the health check output, but the response time exceeds the timeout threshold, creating false negative health status that blocks dependent services.

Recommended action:

Override the default health check in docker-compose.yml with extended timeouts: set timeout to 10s (doubled from default 5s), set start_period to 15s to allow initialization time, set interval to 10s between checks, and configure 3 retries before marking unhealthy. Use the command `.venv/bin/localstack status services --format=json` as the test command.