System Limits π‘ BETA
Read limits from the constants that enforce them, and prove a refusal in the running service before quoting a number.
Admin guide Β· limit verification runbook
| When to use | Before you start | Steps | Verify | Roll back |
|---|---|---|---|---|
| Diagnosing a refusal, tuning throughput | Source checkout, test traffic | Find the consumer, probe the service | Limit enforced at the documented value | Restore prior config or source |
When to use
Use this runbook when a request is throttled, a script is stopped, or a quota appears to be applied.
Before you start
- Rate-limit defaults are 100 req/s general, 10 req/s auth and 50 req/s API per token; WebSocket messages are also limited. The implementation uses
governor. - Per-request limits and execution limits are read from constants in
botserver/srcandbotserver/crates; a number not present in code is not a limit. - Some limits are not configurable. A page that presents them as settings sends an operator to a control that does not exist; the table below says so.
- The system limits security page covers the same contracts from the security side.
Steps
# 1. Find the limit constants and their consumers.
grep -RIn "governor\|rate_limit\|MAX_.*LOOP\|max_depth" botserver/src botserver/crates \
--include='*.rs' | head -40
# 2. Probe a limited route with a test identity.
for i in $(seq 1 20); do
curl -s -o /dev/null -w '%{http_code}\n' http://localhost:8080/health
done
# 3. Compare the observed status with the constant; a missing refusal means
# the guard has no consumer and the documented limit is not active.
Where limits come from
Constants in the source are the authority. A configuration value can only override a limit whose consumer reads that value.
Platform limits
| Area | Authority |
|---|---|
| Execution | BASIC interpreter constants |
| Data and memory | parser and sandbox constants |
| Files and storage | upload validator and quota code |
| Knowledge base | KB context module |
| LLM | LLM pipeline and llm_metrics |
| Concurrency and sessions | session manager |
| API throughput | governor middleware |
HTTP rate limiting
Defaults are 100 / 10 / 50 req/s for general, auth and per-token API traffic. A 429 is the expected refusal.
Code sandbox
The sandbox enforces its own execution limits; read the sandbox module before claiming a tuning knob exists.
Storage quota
Quotas are scoped to the verified tenant owner. A quota is not an authorisation boundary.
What is not configurable
A constant with no configuration reader is not configurable. Record it as fixed in the table rather than presenting a setting that does nothing.
Verify
| Check | Command / surface | Pass condition |
|---|---|---|
| General limit | repeated requests | 429 at 100 req/s |
| Auth limit | repeated auth calls | 429 at 10 req/s |
| API limit | repeated token calls | 429 at 50 req/s |
| Loop limit | runaway BASIC loop | execution stops |
| Upload | oversized file | refused |
| Tenant quota | scoped write | refused when full |
Roll back
π΄ Restore the prior configuration or source and redeploy with the deploy runbook, then re-run the probe. A throttling incident is recorded under incident response.