aws / aws/containers-roadmap

[ECS] [request]: Extend max container definition stopTimeout

Open
#1,808 3 comments 80 reactions 0 assignees View on GitHub
ECS Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

**Tell us about your request**
ECS container definitions allow the time to wait before a container is forcefully killed to be customized using the `stopTimeout` container definition property. This property has a default value of 30 seconds, and a maximum documented value of 120. [AWS API Reference](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-stopTimeout)

It would be useful if the maximum value could be extended, so that services that are slow to shutdown can use `stopTimeout` instead of customizing the ecs-agent configuration option `ECS_CONTAINER_STOP_TIMEOUT`.

**Which service(s) is this request for?**
ECS

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Some containers may take longer than two minutes to shut down as part of expected behavior. As an example, the virtual world Second Life hosts many of its services using ECS, some of which require up to 30 minutes to gracefully shut down.

**Are you currently working around this issue?**
This problem can be worked around by providing `ECS_CONTAINER_STOP_TIMEOUT` to the ecs agent through `/etc/ecs/ecs.config` (linux.) However, this means that updating the value requires an instance refresh or similar operational chore to restart ecs-agent on impacted hosts. It would be easier if this value could be updated through task definitions without the current 120 second limit.

Contributor guide

Open the contributing guide

Research direction

Start with the linked AWS API Reference for the ECS ContainerDefinition stopTimeout property, then review the ecs-agent configuration option ECS_CONTAINER_STOP_TIMEOUT described in the issue. The requested outcome is allowing task definitions to set a stopTimeout above the documented 120-second maximum, without requiring ecs-agent configuration changes or an instance refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, linux
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.