Performance and concurrency
Start with limits matching available model and AgentBox quotas. More workers do not increase external service quotas.
| Setting | Scope |
|---|---|
MAX_CONCURRENT_SESSIONS | Orpheus execution capacity |
max_concurrent_runs | Concurrent runs per Mattermost workflow |
MAX_PARALLEL_THREADS | Connector thread-processing concurrency |
MAX_CONCURRENT_REVIEWS | Concurrent GitLab MR reviews |
message_batch_window | Group nearby messages before starting |
One session executes one run at a time. Independent sessions can run concurrently.
Multiple API and worker instances must share the database, credential-store configuration, allowlist and encryption key. Settings that affect admission must match. Do not configure different capacity limits across one installation.
Run one Mattermost connector per source: server and bot identity. Independent sources can use separate processes. Increasing replicas for the same source is not a scaling method.
The GitLab review connector also runs as one instance per GitLab installation and bot identity. Adjust its concurrency limit without adding replicas for the same bot.
When latency grows, inspect active work, account quotas, sandbox preparation errors and company API response times. Mattermost recovery uses bounded history windows and gives live events priority over archive recovery.