1 Answer
- Newest
- Most votes
- Most comments
5
Hello,
When creating a Task Definition on ECS, you can set the CPU and memory allocation in the Resource allocation limits field (see screenshot below). If you've set CPU to 6 vCPU and Memory soft limit to 10GB it should work. If your container is crashing, have you checked if your EC2 instance can actually handle more than 10GB of memory? Also, do you know how much memory your task might actually need at peak usage?
Hope it helps :)
Relevant content
asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago

I have a EC2 with 16 CPU and 64 GM Memory I think this is not the issue. The container contains a modern software and a modern software consume as much memory it can get. So I think the problem is that ECS will not limit the memory, it will just terminate the container if the limit is reached. EKS will not and I ask me why. Is there no powerful task possible on ECS?
What about your application logs, the ecs agent logs? Why not trying to configure at least the memory for the task?