max_workspaces and capacity,
and each stops
its case the way bash and Linux would, with the same exit status.
Three layers set them:
- The host (the server, or a Cloudflare app) sets ceilings. A workspace may
set a lower value, never a higher one. A workspace that sets
null(no limit) gets the ceiling. - The workspace sets each limit for every session it holds.
- A profile overrides
processesandcommand_limitsfor its sessions, field by field over the workspace’s. It may raise a workspace’s value as well as lower it; only a host ceiling holds it.
What each limit stops
What each limit counts:
max_env: bytes in a session’s variables, functions, aliases and positional parameters, plus 1 per array element and parameter.- A session that would start over it, from
env, a profile or a snapshot, is refused.
- A session that would start over it, from
processes.max: pipeline stages, subshells and background jobs running in the session.max_body_bytes: decoded bytes of one API reply read whole.- A call’s own cap, or the memory left under
max_memory, can stop it sooner. - An error reply keeps only its first 64 KiB.
- A call’s own cap, or the memory left under
timeout command stops jobs, see Shell.
Some bounds are fixed:
- A session id, profile name or workspace id is 1 to 128 characters, with no control characters.
- A command log read returns the newest 10,000 entries, and
/.bash_historythe newest 10,000 commands. A workspace that keeps its command logs in memory holds at most 8 MB of logs, and drops the oldest entries first.
Set them on a workspace
batch session runs 512 processes and 15-minute lines, and every other
session 64 processes and 2-minute lines. See
configuration, profiles and
output limits.
Set the host’s ceilings
A tenant controls its own workspace’s config and profiles, so a host that runs other people’s agents holds them under ceilings. Each comes from the app’s option, else its environment variable, else its key in~/.mirage/config.toml: