Skip to content

Reference

Limits

Every fixed limit and default in Bok Joy, in one place. Each number here is read from the code, and a test fails if the code changes it.

On this page

Limits marked default can be changed by whoever runs the control plane. On the hosted alpha, the defaults apply.

Tasks and manifests#

LimitValue
Tasks in a manifest1 to 1,000
Task ID1 to 128 bytes, unique in the manifest
Handler name1 to 128 bytes
max_attempts1 to 10. Default 3. A task's retry.maxAttempts is the same number.
retry.factor1 to 10. Default 2.
retry.minTimeoutInMs, retry.maxTimeoutInMs0 to 86,400,000 (24 hours) each. Defaults 1,000 and 60,000.
cpu_millis100 to 8,000. Default 500.
memory_mib128 to 16,384. Default 512.
timeout_ms, per attempt100 to 86,400,000 (24 hours). Default 30,000. A handler past it fails the run with no retry.
Machine presetsmicro (0.25 vCPU, 256 MiB) to large-2x (8 vCPU, 16 GiB). See Machine sizes.

Runs#

LimitValue
Payload3 MiB of JSON
Output10 MiB of JSON
Stored out of lineA payload or output over 512 KiB. Reading the run returns it whole.
Request body4 MiB to start a run, 16 MiB for a batch, 1 MiB for anything else
Idempotency key1 to 128 bytes
Tags10 per run, each 1 to 128 characters
Batch1 to 1,000 runs. A batch key is at most 124 bytes.
Error message kept4,096 bytes
Logs kept per attempt64 KiB: the first half and the newest output
RetriesUntil max_attempts attempts have failed. Each waits 1 second, doubling, times a random 1 to 2, and at most 60 seconds, unless the task's retry says otherwise. AbortTaskRunError and a handler's timeout end the run with no retry.
Deferred attemptsRetried after 1 second, doubling to 60 seconds. The run fails if it still cannot start an hour after the first deferral (default).
Capacity waitThe run fails if no worker can hold it within an hour (default). While every machine it may use is busy, it waits with no deadline.
Runs keptUntil run retention deletes the whole run tree, once every run in it has settled and nothing still needs it. Off by default. The hosted alpha deletes a tree whose root completed after 30 quiet days, and one whose root failed or was cancelled after 90.

Workflows#

LimitValue
Steps per workflow1,024
ctx.batchTriggerAndWait1 to 1,000 children of one task. Each counts toward the run tree's limit below.
ctx.sleep0 to 604,800,000 ms (7 days)
ctx.waitEvent timeout1 to 604,800,000 ms (7 days). Default 60,000.
Event name, and event ID1 to 128 bytes each
Event payload1 MiB of JSON
A child's input3 MiB of JSON, as any payload. A batch's inputs are at most 10 MiB together.
A child's resultIts output, at most 10 MiB
Recorded steps256 MiB of JSON in all, stored out of line or not. Every replay reads them all again.
Everything an attempt receives16 MiB: payload, variables and the inline part of every recorded step. Values stored out of line follow it, one at a time.

Held waits#

A wait in a plain Node task (In a plain task):

LimitValue
Time held24 hours in all, per attempt. Past it the attempt stops and is not retried. Held time does not count toward timeout_ms.
Waits at once1
ctx.batchTriggerAndWait0 to 1,000 children of one task
Children an attempt starts1,000, waits and ctx.trigger together
A wait's results16 MiB of JSON together
Waiting tasks a machine keeps2 per slot for each project (default). Past that it starts only the children they wait on.

Live progress and run trees#

LimitValue
Updates per attempt1,400, of which 1,000 are kept for ctx.trigger
ctx.trigger calls per attempt1,000. 100 on a worker agent from before this release.
One update256 KiB
All updates of an attempt8 MiB, of which metadata and milestones may use 6 MiB
Metadata per run64 KiB of JSON
Metadata key, milestone name, trigger key1 to 128 bytes
Milestone detail1,024 bytes
Milestone progress0 to 1
Run tree depth32 (default, at most 64)
Triggered and batched runs per tree10,000 (default, at most 100,000)

Run streams#

LimitValue
Runs in a snapshot500
Milestones per run in a snapshotThe newest 20
Open streams per control plane256
Keep-alive pingEvery 15 seconds. A connection silent for 45 seconds counts as dropped.
Events of a finished run treeKept 30 days (default)
Client reconnectGives up after 60 seconds without a connection

Environments, keys and variables#

LimitValue
Preview branch name1 to 100 bytes
API key name1 to 64 characters
Variable name1 to 128 characters of A-Za-z0-9_, not starting with a digit
Variable value16 KiB
Variables per environment100
Variables per run256 KiB in all

Deployments#

LimitValue
Bundle10,000 files and 64 MiB
One file in a bundle16 MiB

Cloud workers and hot tasks#

LimitValue
Idle cloud workerRemoved after 60 seconds (default)
Cloud worker bootGiven up after 180 seconds (default)
Warm workers per hot task1 to 16
Warm firstA new run of a hot task is left to its warm workers for up to 3 seconds

Queues#

LimitValue
Concurrency limit1 to 100,000 runs of a queue at once, in each environment. Default: no limit.
Queue name1 to 128 letters, digits and _ - . /, not starting with task/
Concurrency key1 to 128 bytes of UTF-8, no whitespace at either end, no control, invisible format or line break characters. Case and bytes count exactly.
Sleep that keeps its slotUnder 60 seconds
GET /v1/queues page50 queues, at most 200

Schedules#

LimitValue
Cron5 fields, at most 100 bytes. The shortest interval is 1 minute.
Time zoneAn IANA name of at most 64 bytes. Default UTC.
Declared schedule environmentsProd only, unless environments names others: dev, staging or preview. Schedules created through the API never run in previews.
Schedules created through the API1,000 per environment
External ID, and deduplication key1 to 128 bytes each
Upcoming ticks in a payload5
Ticks decided per pass256, in one pass a second
Tick historyKept 30 days (default). Each schedule's latest fired tick is always kept.
Deleted API schedulesRemoved with their ticks 30 days (default) after the delete, even when events are kept forever. Their runs stay.
GET /v1/schedules page50 schedules, at most 200

Trigger client#

SettingDefault
Request timeout30 seconds
Retries per request2, from 0 to 10
Longest Retry-After honored10 seconds
Poll interval while waiting1 second
Run reread while a stream is openEvery 10 seconds
GET /v1/runs page50 runs, at most 200. A tag filter names at most 100 tags.