Skip to content

System Limits & Rate Limiting 🟑 BETA

Read the enforced limits from their source and observe a refusal in the running service before documenting a number.

Admin guide Β· limit verification runbook

When to use Before you start Steps Verify Roll back
Tuning throughput, diagnosing a 429, reviewing a script loop Source checkout, test traffic Find the consumer, probe the limit Refusal observed at the documented rate Restore prior config or script

When to use

Use this runbook when a request is throttled or when a change is proposed to a loop, upload or concurrency limit.

Before you start

  • Rate-limit defaults are 100 req/s general, 10 req/s auth and 50 req/s API per token, with WebSocket message limits; implementation uses governor.
  • BASIC execution has loop and recursion protection, and file/data limits are enforced in the interpreter. Read the constants rather than repeating a number from an old page.
  • Tenant and resource limits are scoped by the verified owner; a limit is not a substitute for an authorisation check.
  • A custom value is a configuration change: snapshot before editing and verify after.

Steps

# 1. Find the limit constants and their consumers.
grep -RIn "governor\|rate_limit\|RateLimit" botserver/src botserver/crates \
  --include='*.rs' | head -40

# 2. Find the BASIC loop and file limits.
grep -RIn "max_loop\|recursion\|MAX_.*LOOP\|file_size" \
  botserver/crates/botbasic_* --include='*.rs' | head -30

# 3. Observe a refusal in the running service from a test identity.
for i in $(seq 1 20); do curl -s -o /dev/null -w '%{http_code}\n' http://localhost:8080/health; done

# 4. Check the documented enforcement point for the API you changed.

Verify

Limit Source Pass condition
General governor consumer 100 req/s default in code
Auth auth route limiter 10 req/s default
API per token token limiter 50 req/s default
WebSocket message limiter per-session limit enforced
BASIC loop interpreter constant runaway loop stops
Uploads upload validator oversized file refused
Tenant scoped resource check per-tenant quota respected

Roll back

πŸ”΄ Restore the previous configuration from Vault or version control and redeploy with the deploy runbook, then re-run the probe. A throttling incident is recorded under incident response.