amazon-ecs-cli
amazon-ecs-cli copied to clipboard
Support shm_size for compose 3 projects
Summary
Support shm_size
for docker compose 3 projects
Description
Currently, ecs-cli does not support shm_size
for compose 3 projects because the ServiceConfig
the v3 parser returns does not include this field (Potentially related to https://github.com/moby/moby/issues/26714 ). Adding support for this field will allow customers who require shm_size
in their projects to use v3 syntax with the ecs-cli.
I use ECS-CLI compose to start containers which needs shm_size - any ETA for this feature or is there a documented workaround?
Hi @lucasgut - thanks for letting us know about your need for this. The immediate work around is (if possible) to use a compose 2 project, which will support shm_size
; no ETA on support for shm_size
in compose 3 projects yet, but we will update this issue as we have more info.
@allisaurus Is there an update on this?
We are using selenium based containers which requires shm_size - otherwise the containers could crash randomly.
Update It seems that this option is already supported / although still not in fargate. Could this issue be closed if that's the case?
@OneEyedSpaceFish You're right that ECS supports shm_size for the EC2 launch mode, however the ecs-cli still doesn't support using this field with docker compose 3 syntax since it was removed as a service-level field there (more context above).
ecs-cli users today can specify shm_size
per-service using compose 2 projects, however if that's not an option for you, something we could consider is adding service-level shm_size
to the ecs-params file, similar to how you'd specify service-level CPU or memory constraints with a compose 3 project today. Would either the v2 options or the addition of shm_size
to ecs-parms unblock your use case?
@allisaurus We are using Fargate, so I don't think that any of the following features would benefit us directly.
Unfortunately, I assumed that the option is not supported at all in ECS, but upon further research - after I already made a comment - I realized that it's supported in ECS, just not in Fargate lunch mode.
Is there an option to add the shm_size support for Fargate lunch modes?
@OneEyedSpaceFish , no worries re: previous comment, that's why we're here :)
Unfortunately, shm_size
is not available in Fargate and is unlikely to be added due to its effect on the host instance (which is largely abstracted away in Fargate).
If you're seeing containers randomly crash, you may be able to mitigate this by allocating more task-level memory, though YMMV given your specific use case.