Skip to main content
An idle timeout stops or pauses a sandbox when no active connection is detected for a configured duration. It is separate from the sandbox timeout, which counts down regardless of activity. The value is stored in the sandbox metadata, so it is set at creation and appears beside the other metadata keys.
Install the SDK, or the CLI for ppio commands, and set the PPIO_API_KEY and PPIO_DOMAIN environment variables before running these examples. See Quickstart and Install and authenticate.

Set an idle timeout

The idle timeout is configured through the metadata field when a sandbox is created. The key is idle_timeout and the value is the number of seconds, as a string.
string
Metadata key. The number of seconds, as a string.

Pause instead of kill

To pause the sandbox instead, so it can be resumed later, enable the auto-pause option (auto_pause=True in Python, autoPause: true in Node.js).

Combine with other metadata

The idle_timeout key can be combined with other metadata keys already in use.

Disable the idle timeout

To disable the idle timeout for a sandbox, omit the idle_timeout key from the metadata, or set it to 0.
The idle timeout is stored in the sandbox metadata under the idle_timeout key, beside any other metadata keys of the sandbox. See List and filter sandboxes.
Last modified on November 19, 2026