Delayed shutdown of ECS Fargate tasks?

0

Hello,

I have a problem with delayed shutdown of ECS Fargate tasks, let me explain by example:

  • in a Docker image at the very last line of the entrypoint script I have simple echo statement. It's being logged at 11:18:22.004
  • I have another process, which is checking ECS tasks statuses on some events, an it's logged that at 11:18:30.023 (8 s later execution of last line of entrypoint) both last and desired statuses of the task are RUNNING

So my question is it expected that ECS Fargate takes more than 8 secs to shutdown task, specially considering that desired status also remains RUNNING after that time.

已提问 2 年前863 查看次数
1 回答
0

An ECS/Fargate tasks stops when the application in your container stops (or for that matter if a critical container exits for any reason). If your container doesn't shut down, the task will keep on running. It would be good to take a closer look and see if there are any additional processes that continue to run in this case.

profile pictureAWS
Mats
已回答 2 年前
  • Thanks for this guess. Indeed in the middle of the entrypoint I launch some 3rd party software, which might be spawning process(es). I'll try to verify that and decrease stopTimeout of container to see if it helps.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则