Why does ECS deploy fail ALB healthchecks randomly?

0

I'm seeing this error in random CDK deploys

Task failed ELB health checks in (target-group arn:aws:elasticloadbalancing:ap-southeast-2:649922175064:targetgroup/....

Basically the first task will fails with the above message and is stopped but ECS will retry launching another task and then everything works. The problem is this adds at least an additional 5 minutes to my deploy time which is not ideal. The only change being deployed is a new ECR image and the task definition pointing to the new image. I don't understand why ECS tasks occasionally fails ELB health checks but it means having to waiting for the failed task to completely stop before ECS will retry to launch another task.

How could we debug the issue?

1개 답변
0

Hi,

How long is the bootstart of your container before he becomes up and running ? This is an article of Nathan Peck, he gives some advices about to deploy ECS containers correctly. https://nathanpeck.com/speeding-up-amazon-ecs-container-deployments/

profile picture
Donov
답변함 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인