0
votes

We are using AWS ECS with launch type "Fargate" manage our containers. We have memory leak issues which we're actively investigating, however, in the meantime we need a solution to take down tasks that pass a certain memory threshold.

Using the AWS cli to run "update-service force-new-deployment" takes all the tasks down. We could target individual tasks using "aws ecs stop-task", however, I cannot find a metric in cloudwatch that gives us this task-specific information. We can only seem to find cluster or service level averages.

Any helps would be appreciated.

1

1 Answers

0
votes

could not comment so posting as an answer.

You could work it around with a hard memory limit set for the container with the memory param.

If your container attempts to exceed the memory specified here, the container is killed.

https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html