-
Notifications
You must be signed in to change notification settings - Fork 204
Closed
Labels
Description
Problem
Some engineers forget to stop their dev environments, resulting in unnecessary charges.
Solution
Allow to configure the inactivity duration for dev environments.
type: dev-environment
ide: vscode
inactivity_duration: 2hIf a dev environment has been inactive for the configured amount of time, it will be automatically terminated.
Inactivity can be defined as a lack of SSH connections. Internal connections from dstack-server should be ignored and not count as activity. It is also acceptable to ignore short-lived connections lasting only a few seconds.
The default is to disable automatic termination (inactivity_duration: off).
Implementation plan
- Track SSH connections in dstack-runner
- Add the
inactivity_durationconfiguration property - (Optional) [Feature]:
inactivity_durationin-place update #2325 - (Optional) Display the dev environment activity status in CLI and/or UI
- Docs
Workaround
Users could implement this outside of dstack using the API.
max_duration can also work for some use cases.
Would you like to help us implement this feature by sending a PR?
Yes