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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南