How capacity works
Your plan limits how much work runs at the same time. This page shows the two limits, how a run counts against them, and what happens when one is full.
Two limits on what runs at once
- Running VMs. Every plan has this limit. It is the number of runs that can be active at the same time, of any size.
- Units. Only some plans have this limit. Today these plans have it: enterprise (on request). Each active run uses units, and the total must stay at or below the limit.
A new run starts only when it fits under every limit that your plan has. A plan without units (free, starter, team and pro) is not unlimited: its running-VM limit and its list of presets still apply. Presets and limits shows the numbers of each plan.
Each preset has a weight
A weight is the number of units that one run of a preset uses. The smallest preset, std.micro, weighs 1 unit. The weights come from the same preset table that the platform reads.
A weight is not the vCPU or the memory number. It shows how much of a host the preset takes.
A run uses its weight while it is active
A run takes its weight in units when the platform accepts it. It gives the units back when it gets a final status (see Lifecycle and statuses). A run that waits for a host also uses its units.
Runs from a webhook or a schedule count in the same way. A run uses the preset that its deployment's task.yaml declared, or the default preset of your plan when it declared none, and the weight of that preset.
Mix presets as you like
The limits count runs and units, not presets. You can run many small runs, a few large runs, or a mix. The example below uses the enterprise plan: 240 units and 24 running VMs. Each row shows the active runs, then one more run.
The first row fills the running-VM limit with small runs. The second row fills the units with large runs. The last two rows show that free units must cover the full weight of the next run.
Pinned VMs count on their own
A pinned VM counts against the pinned-VM limit of your plan. An idle pinned VM is not a running VM and uses no units. A run on a pinned VM counts like any other run: it is a running VM and it uses its weight.
When a limit is full
- The running-VM limit is full:
429withconcurrent-run-quota. The platform checks this limit first. - The units are full:
429withrun-unit-quota. A run of a lighter preset can still fit. - A host is busy: this is not a plan limit, and it never gives a
429. With--on-busy queue(the default when the deployment sets noexecution.on_busy) the run waits for room for a limited time. With--on-busy rejectit fails at once.
--on-busy does not wait for a plan limit. A full plan limit refuses the run at once. A webhook gets the same 429, and a scheduled run waits and tries again: a one-time run for up to one hour after its time, a recurring run until its next run time (at most 10 minutes).
Wait for Retry-After
A rate limit (run-rate-quota, rate-limited) answers 429 with a Retry-After header. During a short server restart, the API answers 503 with the same header. The value is a whole number of seconds. Wait that long, then send the request again.
The two limits on this page send no Retry-After: concurrent-run-quota and run-unit-quota. Room comes back when a run ends, not at a set time.
The CLI waits for Retry-After when it reads a run. The Terraform provider waits for it too, for up to 30 seconds, and tries a request at most 4 times.
See your numbers
quota shows active_runs against your running-VM limit. On a plan with units, a units line follows it. On a plan without units, there is no units line.
$ ignitify quota | grep -E '^(active_runs|units) 'active_runs 11 / 24units 232 / 240
whoami shows the weight of each preset that your plan allows, but only on a plan with units. whoami --json always has the fields: limits.max_units (null when there is no units limit), usage.active_units and unit_weights.
$ ignitify whoami | grep -A8 'Units per run'Units per run (by preset)std.micro 1 std.small 2 std.medium 4 std.large 8 std.xlarge 16 mem.large 16 mem.xlarge 32 cpu.large 20
Words on this page
- Unit: the amount that a run of
std.microuses. A plan with units has a limit on the total. - Weight: the number of units that one run of a preset uses.
- Running-VM limit: the number of runs that can be active at the same time, on every plan.
- Pinned VM: a VM that stays up between runs. It counts against its own limit. While idle it uses no units; a run on it uses its weight.