Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.opencomputer.dev/llms.txt

Use this file to discover all available pages before exploring further.

The CLI groups three related actions for sizing a sandbox:
CommandWhat it does
oc sandbox autoscaleTurn the platform autoscaler on/off and inspect its config
oc sandbox scaleManually resize once
oc sandbox lock / unlock / lock-statusFreeze or unfreeze the current size
Memory tiers are fixed: 1024, 4096, 8192, 16384, 32768, 65536 MB. CPU follows memory per the platform’s tier table (e.g. 8 GB → 4 vCPU); you don’t pick CPU separately. For the underlying concepts and how these three modes interact, see the Elasticity guide.

oc sandbox autoscale <id>

Configure or inspect per-sandbox autoscale. HTTP API → Run with no flags to print the current configuration:
oc sandbox autoscale sb-abc123
# Autoscale enabled for sb-abc123 (1024–16384 MB)
Enable with bounds:
oc sandbox autoscale sb-abc123 --on --min 1024 --max 16384
Disable:
oc sandbox autoscale sb-abc123 --off
When enabled, the platform watches memory pressure and resizes the sandbox between --min and --max:
  • Scale up on a single 1-min sample above 75 % memory utilization. Cooldown 60 s between up-scales.
  • Scale down only when the 1-min, 5-min, AND 15-min averages all sit below 25 %. Cooldown 5 min between down-scales.
The asymmetry is deliberate: rapid response when the user notices lag, conservative shrink after sustained idle. Flags
FlagDescription
--onEnable autoscale (requires --min and --max).
--offDisable autoscale. Mutually exclusive with --on.
--min NMinimum memory tier in MB. Must be an allowed tier.
--max NMaximum memory tier in MB. Must be an allowed tier and ≥ --min.
Errors
  • scaling_locked — the sandbox has a scaling lock active. Run oc sandbox unlock <id> first.
  • 402 Payment Required--max exceeds your plan cap.

oc sandbox scale <id> <memory-mb>

Manually resize a sandbox to a specific memory tier. HTTP API →
oc sandbox scale sb-abc123 8192
# Scaled sb-abc123 to 8192MB / 400% CPU
A manual scale disables autoscale on this sandbox as a side effect — explicit intent overrides the loop. Re-enable with oc sandbox autoscale --on if you want size to track load again. Errors
  • scaling_locked — the sandbox has a scaling lock active. Run oc sandbox unlock <id> first.
  • 402 Payment Required — requested size exceeds your plan cap.

oc sandbox lock <id>

Pin a sandbox at its current size. HTTP API →
oc sandbox lock sb-abc123
# Sandbox sb-abc123 locked (scaling disabled)
While locked:
  • oc sandbox scale is rejected with scaling_locked.
  • oc sandbox autoscale --on is rejected with scaling_locked.
  • The platform autoscaler skips the sandbox entirely.
Locking also disables autoscale (single knob — “I don’t want this scaling, period”). Unlocking does NOT re-enable autoscale; run oc sandbox autoscale --on explicitly if you want it back.

oc sandbox unlock <id>

Clear the scaling lock.
oc sandbox unlock sb-abc123
# Sandbox sb-abc123 unlocked

oc sandbox lock-status <id>

Print the current scaling-lock state.
oc sandbox lock-status sb-abc123
# Sandbox sb-abc123 is unlocked