Skip to content

[Feature]: Automatically stop inactive dev environments #2268

@jvstme

Description

@jvstme

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: 2h

If 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

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions