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.

posta 2 anni fa863 visualizzazioni
1 Risposta
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
con risposta 2 anni fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande