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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン