When my Amazon Elastic Container Service (Amazon ECS) deployment fails, the Amazon ECS deployment circuit breaker mechanism doesn't activate, and my deployment doesn't roll back.
Resolution
The circuit breaker might not trigger rollbacks, even if you have activated your rollback settings, because of the following issues:
- Unmet task failure threshold
- Applications issues
- Misconfigured health check parameters
Unmet task failure threshold
The circuit breaker operates within a threshold range from 3 to 200. If you start multiple consecutive deployments immediately after a single task failure, then you might not reach the circuit breaker threshold. If the threshold isn't reached, then wait until the threshold is met.
Note: You can't modify the fixed threshold values.
Application issues
The circuit breaker monitors the task initialization process. If a task successfully starts, passes the dependent health checks, but then stops, then the circuit breaker might not activate. To check for application issues, review your container initialization logs in the logConfiguration section of your task definition for errors.
For more information, see Why is my Amazon ECS task stopped?
Misconfigured health check parameters
Incorrect health check parameters might impact the circuit breaker mechanism's effectiveness.
Make sure that you set your health check intervals to less than the default of 30 seconds. Higher health check intervals can delay the detection of failed tasks. For more information, see Determine Amazon ECS task health using container health checks.
Make sure that the unhealthy and healthy threshold levels are close to the default. Threshold levels that are too high or too low might lead to false positives or negatives. For more information, see Optimize load balancer health check parameters for Amazon ECS.
Related information
A deep dive into Amazon ECS task health and task replacement