ECS tasks keeps draining for too long

0

One of ECS Task status show as deactivating for long and if I go to container page by clicking containerID, there it show status as running. Even i tried to stop from console and AWS Cli, non of them were stopping the task and it keeps running.. This may effect my billing. So please help me on this to stop.

已提問 1 年前檢視次數 928 次
1 個回答
0

I could see it might be due to ut-of-memory (OOM) error. If your tasks have a high memory/CPU utilization, then your container instance might not have enough resources to run the ECS agent, leading to disconnected agent [4]. You can choose to reserve some memory for the Amazon ECS container agent and other critical system processes on your container instances, so that your task's containers don't contend for the same memory. For more information, please see [5] for container instance memory management.

Please create a support case with ECS ARN, region, cluster name, service name, task definition name, task id, instance id and platform so that AWS team can help to stop incurring bill for task which is not stable.


References:

[1] Troubleshoot instances with failed status checks - Retrieve the system logs - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html#troubleshooting-retrieve-system-logs

[2] Troubleshoot instances with failed status checks - Suggested actions - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html#MemoryOOM-suggested-actions

[3] How do I change my container instance type in Amazon ECS? - https://aws.amazon.com/premiumsupport/knowledge-center/ecs-change-container-instance-type/

[4] How do I troubleshoot a disconnected Amazon ECS agent? https://aws.amazon.com/premiumsupport/knowledge-center/ecs-agent-disconnected-linux2-ami/

[5] Container Instance Memory Management - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/memory-management.html

[6] Deregister an Amazon EC2 backed container instance - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deregister_container_instance.html

AWS
已回答 1 年前

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

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

回答問題指南