Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/docs/sandbox/api/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const sandbox = getSandbox(
- `sandboxId` - Unique identifier for this sandbox. The same ID always returns the same sandbox instance
- `options` (optional) - See [SandboxOptions](/sandbox/configuration/sandbox-options/) for all available options:
- `sleepAfter` - Duration of inactivity before automatic sleep (default: `"10m"`)
- `keepAlive` - Prevent automatic sleep entirely (default: `false`)
- `keepAlive` - Prevent automatic sleep entirely. Persists across hibernation (default: `false`)
- `containerTimeouts` - Configure container startup timeouts
- `normalizeId` - Lowercase sandbox IDs for preview URL compatibility (default: `false`)

Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/sandbox/configuration/sandbox-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const sandbox = getSandbox(binding, sandboxId, options?: SandboxOptions);

Keep the container alive indefinitely by preventing automatic shutdown. When `true`, the container will never auto-timeout and must be explicitly destroyed using `destroy()`.

The `keepAlive` flag persists across Durable Object hibernation and wakeup cycles. Once enabled, you do not need to re-set it after the sandbox wakes from hibernation.

<TypeScriptExample>
```ts
// For long-running processes that need the container to stay alive
Expand Down
Loading