ECS memory issues

The Postman Insights Agent needs at least 300 MB of memory to run. If you've used most memory available, you need to make adjustments. Consider specifying an upper limit. Learn more from the following use cases.

For more information, see How Amazon ECS manages CPU and memory resources.

OutofMemory message

A task memory limit is required for an Amazon Elastic Container Service (ECS) Fargate instance but optional for an ECS on EC2 instance. If you specify a task-level memory limit, the ecs add command won't specify the memory size for the Insights Agent. This means the Agent shares memory with other containers in the task.

If the instance runs out of memory, one of the containers may stop operating. If you see instances restarting after an OutOfMemory outage, you can either increase the hard limit for the task, or set a hard limit on the Agent. To set a hard limit on the Agent, specify at least 700 MB as the Memory hard limit value in the container definition.

For more information, see How do I troubleshoot OutOfMemory errors in Amazon ECS?.

Container size is too large

If you don't specify a task-level memory limit, then the ecs add command sets a container-level memory request of 300 MB. This means that your task requires additional 300 MB of memory to be scheduled on an instance.

If you use a Docker Compose file to create your ECS task or service and no memory limit is specified, the Insights Agent sidecar is allocated 512 MB by default.

If you've already tuned the other containers in your task definition based on the instance size used in your cluster, the total size of the base container and the sidecar may be too large to schedule. You'll get the following message:

INFO[0006] (service mgg-test) was unable to place a task because no container instance met all of its requirements. The closest matching (container-instance 79cac21ecdb44097a989744944e202d7) has insufficient memory available. For more information, see the Troubleshooting section of the Amazon ECS Developer Guide. timestamp="2023-12-18 23:31:31 +0000 UTC"

Insufficient memory

In this case, you may need to reduce the memory or memoryReservation parameters on other containers in the task by the 300 MB (or 512 MB) requested by the Insights Agent.

Last modified: 2025/07/29