My Java application appears to be running out of "open files" limit when running in a Docker container in AWS ECS. Upon further investigation, I found that the open files limit defaults to 1024.
Typically, in Linux I would edit /etc/security/limits.conf
. That does not appear to take effect when I modify that file in my Docker container.
I know I can also pass command line ulimit parameters to docker run
as documented here. But I do not have direct access to the Docker command line in ECS. There's gotta be a way to do it via a Task definition. How do I accomplish this ?
The link parameter allows containers to communicate with each other without the need for port mappings. Only supported if the network mode of a task definition is set to bridge. The name:internalName construct is analogous to name:alias in Docker links.
This parameter maps to MemoryReservation in the Create a container section of the Docker Remote API and the --memory-reservation option to docker run . If a task-level memory value is not specified, you must specify a non-zero integer for one or both of memory or memoryReservation in a container definition.
ECS task definition JSON allows you to set ulimits. The Ulimits on ecs task definition correspond to Ulimits in docker run.
Please refer to the following page for more information: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With