Replies: 1 comment 1 reply
-
|
This is very unlikely to be an inherent “python-slim limitation” in threading or performance. What typically changes between On Fargate, the common pattern for “service looks healthy but task is unhealthy” with a working The health check command or runtime dependencies are missing in slim images. If your container or health check relies on tools like If the health check is a CMD-style health check that runs a command inside the container (for example Fix by either:
Debian-based slim example: RUN apt-get update && apt-get install -y --no-install-recommends Timing is another frequent cause: default health check grace/timeout/retry settings can mark tasks unhealthy during slow startup, even if the endpoint works later. Increase health check grace period / timeout / retries:
Also confirm the container is listening on 0.0.0.0 (not 127.0.0.1) and the correct port is exposed, because ALB health checks will fail if the server binds only to localhost. The practical next step is to compare task logs and the ECS “Health status” details for the exact health check failure reason, and compare the installed OS packages between the two images. Summary: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I spent many days debugging a container that I deployed to AWS Fargate because the corresponding service in the cluster was marked as healthy, but the task was marked as unhealthy, even though the server was correctly responding to calls to the /healthy route. After changing the Docker image to use version 3.10.14 of Python instead of python-slim, the task was marked as healthy. My theory is that the base version might have limitations in threading, processing, or optimizations and was slow to respond to requests, but I didn't find anything that satisfactorily explains this.
Beta Was this translation helpful? Give feedback.
All reactions