Runtime Limits
These settings bound agent HTTP bodies, database, messaging, and evaluator resource use. They can be supplied as CLI flags or environment variables. Vigilo parses subsystem settings only for commands that consume that subsystem; unrelated configuration cannot block a database-only command.
setup --skip-evaluators does not download or compile evaluators. Default setup
uses the host's default Wasm limits when validating downloaded packages. See
core evaluator installation for download
limits, collection pins, and GitHub authentication.
Agent HTTP Bodies
Worker commands accept these process-local ceilings:
| Flag | Environment variable | Default |
|---|---|---|
--agent-max-request-bytes | VIGILO_AGENT_MAX_REQUEST_BYTES | 4 MiB (4,194,304 bytes) |
--agent-max-response-bytes | VIGILO_AGENT_MAX_RESPONSE_BYTES | 4 MiB (4,194,304 bytes) |
Values must be between 1 byte and 1 GiB. A run profile can request lower limits
through harness.http.max_request_bytes and harness.http.max_response_bytes.
Omitted values use the executing worker's ceilings. A worker rejects zero or
above-ceiling overrides before sending a request; it does not silently clamp them.
Use consistent ceilings across workers serving the same workload.
The response evidence contract supports at most 4 MiB of original response bytes. Workers reject a larger effective response limit before invocation. When the process ceiling is higher, set an explicit profile response limit of 4 MiB or less; increasing a transport ceiling does not increase the evidence contract's capacity.
Request limits count serialized JSON body bytes, including escaping and UTF-8, but not HTTP headers. Responses are bounded while reading, including non-success responses, without relying on Content-Length. Transfer framing is not counted. The client does not enable automatic content decompression. Oversized bodies produce terminal invocation-limit errors without retrying the same body; they are not evaluator scores. Unauthenticated error excerpts remain limited to 512 characters; credential-bearing requests omit them.
Existing request timeouts still apply. These byte ceilings do not bound the whole process: concurrent calls, request construction, parsed output, and evaluator copies consume additional memory. Select ceilings alongside worker concurrency. See run profiles for endpoint configuration.
Worker credential resolution has separate source, response, concurrency, and deadline limits. See Agent Credentials.
Command Scope
DATABASE_URL, database-pool settings, VIGILO_CONTROL_DATABASE_ALIAS, and
output settings are root options. Registry and runtime commands require a database
URL; evaluator package performs local preparation without one. MESSAGING_URL is accepted only by coordinator and worker.
Wasm limits are accepted only by worker, evaluator package, evaluator publish, and
evaluator test. Command-scoped CLI flags follow their owning command, while
environment variables supply the same command-specific settings.
vigilo coordinator --messaging-url amqp://broker start
vigilo worker --messaging-url amqp://broker --wasm-timeout-ms 5000 start
vigilo run create --shard-assignment-policy spread-active \
--profile-file profile.yaml --dataset-file dataset.yaml
DATABASE_MAX_CONNECTIONS is a limit for each lazily initialized database
pool, not an aggregate process limit. A process that contacts several database
aliases can own one pool per alias; size the setting against the database
connection budget and number of processes.
Database Failure Isolation
Coordinators and workers use one process-local circuit breaker per database alias. Repeated connection-level failures open only that alias's circuit. Durable coordinator work remains pending, and worker messages for that alias are delayed, while healthy aliases continue in the same process. After the cooldown, one half-open probe tests recovery. Explicit database and shard administration bypasses the breaker.
Runtime pools also apply bounded PostgreSQL statement_timeout and
lock_timeout settings. Coordinator placement operations have an outer
wall-clock deadline, so a connected target that stops making progress cannot
hold the placement sweep indefinitely. Worker claim, load, heartbeat,
persistence, and settlement operations use the same deadline; agent calls,
Wasm execution, and broker operations do not. The statement timeout is 80% of
the configured operation timeout; lock timeout is one quarter of the statement
timeout, capped at 5 seconds. A single setting keeps these limits ordered.
| Flag | Environment | Scope | Default | Purpose |
|---|---|---|---|---|
--database-acquire-timeout-seconds | VIGILO_DATABASE_ACQUIRE_TIMEOUT_SECONDS | All commands | 10 | Maximum wait to acquire a PostgreSQL connection. |
--database-operation-timeout-seconds | VIGILO_DATABASE_OPERATION_TIMEOUT_SECONDS | coordinator, worker, run create | 30 | Maximum wall-clock time for one retryable runtime database operation; derives the server statement and lock limits. |
--database-circuit-breaker-enabled | VIGILO_DATABASE_CIRCUIT_BREAKER_ENABLED | coordinator, worker, run create | true | Enables process-local execution-database circuit breakers. |
--database-circuit-failure-threshold | VIGILO_DATABASE_CIRCUIT_FAILURE_THRESHOLD | coordinator, worker, run create | 3 | Consecutive availability failures required to open an alias's circuit. |
--database-circuit-initial-open-seconds | VIGILO_DATABASE_CIRCUIT_INITIAL_OPEN_SECONDS | coordinator, worker, run create | 10 | Initial open interval before one recovery probe is admitted. |
--database-circuit-max-open-seconds | VIGILO_DATABASE_CIRCUIT_MAX_OPEN_SECONDS | coordinator, worker, run create | 120 | Maximum open interval after repeated failed probes. |
I/O, TLS, protocol, connection-class, shutdown, target resource, pool acquisition timeout, statement timeout, and outer operation timeout failures affect the breaker. Route state, constraints, serialization failures, deadlocks, lock contention, and missing secrets do not. Cooldowns use process-local jitter, so processes do not all probe at the same instant.
The standalone coordinator caps connections to separately pooled execution placements at one second. The control pool uses the configured acquisition timeout. During lease recovery, dispatch, aggregation, finalization, and outbox publication, a connection failure defers that alias through the rest of the cycle. Other placements continue, and runs that require a deferred placement wait for their full shard summary set.
Deferred invocation work shares a database admission limit equal to the placement's pool size across expiry, polling, and cancellation. Admission covers each database operation and releases as soon as it finishes. HTTP calls run outside admission, so slow responses leave capacity for expiry.
The standalone coordinator gives each placement one second to resolve its outbox pool and acquire the first connection. The backlog read and batch claim share that connection. After broker publication, each settlement connection has its own one-second acquisition deadline. Acquisition failures count against the placement's circuit breaker and leave unfinished deliveries eligible for retry. Outbox claim and settlement SQL use the server limits. Broker publication runs outside the database deadlines and uses the messaging circuit. Cancellation drops owned transactions, so uncommitted dispatch cursors and creation work remain durable for retry.
A worker checks the alias circuit before claiming a message. Availability timeouts and PostgreSQL contention delay only that message; they do not consume the bounded worker-failure retry budget or terminate the process. If the chunk was already claimed, redelivery is delayed past the processing lease so another worker cannot race the still-live claim. The lease token and attempt guards make replay idempotent. Failure to publish the delayed copy remains process-visible because acknowledging the original without a durable retry would lose work.
Messaging Failure Isolation
Each coordinator or worker process owns one circuit for its configured message broker. Publish, one-shot receive, and consumer-creation attempts acquire admission before contacting RabbitMQ. Consecutive connection, channel, I/O, or heartbeat failures open the circuit. Calls then fail locally until one half-open probe is admitted after the bounded, jittered cooldown.
Outbox events remain durable while the coordinator cannot publish them, and unacked worker deliveries remain available for redelivery. Long-running workers also retain their bounded 250 ms to 30 second consumer reconnect backoff; it paces the service loop while the circuit controls process-wide broker admission. Per-message retry queues and retry budgets remain independent because they govern processing outcomes, not broker availability.
| Flag | Environment | Scope | Default | Purpose |
|---|---|---|---|---|
--messaging-circuit-breaker-enabled | VIGILO_MESSAGING_CIRCUIT_BREAKER_ENABLED | coordinator, worker | true | Enables the process-local message-broker circuit breaker. |
--messaging-circuit-failure-threshold | VIGILO_MESSAGING_CIRCUIT_FAILURE_THRESHOLD | coordinator, worker | 3 | Consecutive broker availability failures required to open the circuit. |
--messaging-circuit-initial-open-seconds | VIGILO_MESSAGING_CIRCUIT_INITIAL_OPEN_SECONDS | coordinator, worker | 10 | Initial open interval before one recovery probe is admitted. |
--messaging-circuit-max-open-seconds | VIGILO_MESSAGING_CIRCUIT_MAX_OPEN_SECONDS | coordinator, worker | 120 | Maximum open interval after repeated failed probes. |
Returned or negatively acknowledged publishes, malformed messages, and other application-level failures do not mark RabbitMQ unavailable. Circuit state is process-local and resets on restart; durable PostgreSQL state and RabbitMQ delivery state remain authoritative.
Worker Chunk Concurrency
vigilo worker start processes chunk-ready broker messages with bounded
per-process concurrency. The default keeps one
per worker
process, which matches the safest local development posture and scales
horizontally by running more workers. RabbitMQ
matches that limit so a
worker does not reserve messages it cannot process. Larger deployments can
raise the limit when chunks are uneven, agent calls are I/O-bound, or retry
waits create tail latency.
| Flag | Environment | Default | Purpose |
|---|---|---|---|
--max-inflight-chunks | VIGILO_WORKER_MAX_INFLIGHT_CHUNKS | 1 | Maximum unacked chunk messages processed concurrently by one worker process. RabbitMQ stream prefetch is set to the same value so a worker does not reserve more chunk messages than it can actively process. |
Run Creation Paging
Immediate creation and coordinator recovery use the same bounded metadata paging policy. Case payloads stay in object storage; these limits govern chunk scheduling metadata.
| Flag | Environment | Scope | Default | Purpose |
|---|---|---|---|---|
--run-creation-case-batch-size | VIGILO_RUN_CREATION_CASE_BATCH_SIZE | run create, coordinator | 1000 | Maximum planned cases represented by one chunk-metadata insert, with at least one whole chunk. |
--run-creation-case-page-budget | VIGILO_RUN_CREATION_CASE_PAGE_BUDGET | run create, coordinator | 64 | Maximum immutable chunk pages admitted per creation attempt. |
--default-shard-database-alias | VIGILO_DEFAULT_SHARD_DATABASE_ALIAS | setup, run create | primary | Default target for single-default assignment. |
--shard-assignment-policy | VIGILO_SHARD_ASSIGNMENT_POLICY | setup, run create | single-default | Placement policy used for newly created runs. |
When increasing this value, size the database pool, agent endpoint capacity, , and Wasm evaluator concurrency together. A practical upper-bound check is:
max_inflight_chunks * case_parallelism_per_chunk <= agent/db concurrency budget
wasm_max_concurrent_evaluations <= CPU and memory budget
Wasm Evaluator Isolation
Each evaluator invocation runs in a fresh
with CPU, memory,
table, instance, timeout, and logging limits.
bounds deterministic instruction
use. Workers also use a process-wide
so
valid evaluators cannot exhaust host resources. These flags are scoped to
worker, evaluator package, evaluator publish, and evaluator test.
| Flag | Environment | Default | Purpose |
|---|---|---|---|
--wasm-max-memory-bytes | VIGILO_WASM_MAX_MEMORY_BYTES | 67108864 | Maximum linear memory bytes per evaluator invocation. |
--wasm-max-table-elements | VIGILO_WASM_MAX_TABLE_ELEMENTS | 10000 | Maximum table elements per evaluator invocation. |
--wasm-max-instances | VIGILO_WASM_MAX_INSTANCES | 3 | Maximum component instances per evaluator invocation. |
--wasm-max-memories | VIGILO_WASM_MAX_MEMORIES | 1 | Maximum linear memories per evaluator invocation. |
--wasm-max-tables | VIGILO_WASM_MAX_TABLES | 2 | Maximum tables per evaluator invocation. |
--wasm-fuel-per-evaluation | VIGILO_WASM_FUEL_PER_EVALUATION | 50000000 | Wasmtime fuel budget for deterministic CPU interruption. |
--wasm-timeout-ms | VIGILO_WASM_TIMEOUT_MS | 5000 | Wall-clock timeout enforced by epoch interruption. |
--wasm-epoch-tick-interval-ms | VIGILO_WASM_EPOCH_TICK_INTERVAL_MS | 10 | Epoch ticker granularity used for timeout checks. |
--wasm-max-concurrent-evaluations | VIGILO_WASM_MAX_CONCURRENT_EVALUATIONS | 8 | Hard process-local cap on active Wasm evaluator invocations. |
--wasm-max-log-message-bytes | VIGILO_WASM_MAX_LOG_MESSAGE_BYTES | 4096 | Maximum bytes retained from each evaluator host log message. |
--wasm-max-log-messages | VIGILO_WASM_MAX_LOG_MESSAGES | 128 | Maximum evaluator host log messages per invocation. |
Sizing
Set VIGILO_WASM_MAX_CONCURRENT_EVALUATIONS from available CPU and memory, not from queue depth. A worker's evaluator memory exposure is approximately:
wasm_max_concurrent_evaluations * wasm_max_memory_bytes
plus Wasmtime/runtime overhead and non-evaluator worker memory.
For example, the defaults allow up to 8 active evaluator invocations at 64 MiB each, or about 512 MiB of evaluator linear memory exposure per worker process.
Failure Behavior
If an evaluator exceeds its sandbox budget, the invocation is recorded as an evaluator runtime error. The worker continues processing the rest of the batch and persists the error result through the normal evaluator-result path.
Evaluator HTTP
Workers execute evaluator HTTP only under an authorized attempt snapshot. Set
--evaluator-http-config or VIGILO_EVALUATOR_HTTP_CONFIG to a worker-local JSON
file for operator ceilings and credential bindings. Omitted fields use these defaults:
{
"request_bytes": 1048576,
"response_bytes": 4194304,
"request_timeout_ms": 30000,
"total_time_ms": 60000,
"requests": 8,
"concurrency": 64,
"bindings": []
}
Body ceilings range from 1 byte to 64 MiB. Request timeouts range from 1 to 300,000 ms; the cumulative HTTP budget ranges from 1 to 3,600,000 ms. Request count and worker-wide concurrency range from 1 to 1,024. Each synchronous evaluator invocation issues one request at a time. Unknown configuration fields and duplicate bindings are rejected. The configuration file is limited to 1 MiB and 4,096 bindings.
An optional binding selects a configured credential provider reference:
{
"bindings": [{
"evaluator_id": "01900000-0000-7000-8000-000000000004",
"method": "POST",
"uri": "https://judge.example.com/evaluate",
"credential": "judge-api"
}]
}
Bindings do not grant network access. Configure
destination permissions separately
and supply the shared credential provider
through worker --agent-credentials. Files contain references, not secrets.
The requested timeout is clamped to the operator ceiling, remaining cumulative HTTP time and remaining Wasm execution deadline. Permit waiting, credential resolution, DNS, connection and body reads share that deadline. Completed requests consume elapsed time, including failures. Cancellation consumes the reserved time; sequential requests do not reset the count or budget. Dropping the owning worker task interrupts HTTP work. An OS hostname lookup already running retains its admission slot until the resolver returns, preventing cancelled requests from accumulating unbounded resolver jobs; it cannot start an HTTP request after cancellation. Other transport permits release when I/O is dropped. Wasm fuel and epoch limits continue to bound evaluator computation.
The transport validates all resolved addresses and pins them for the connection. Redirects, ambient proxies and automatic retries are disabled. Bodies are bounded while read, including chunked responses. HTTP 4xx/5xx and redirects return ordinary responses; policy, credential, network, timeout and limit failures return host errors. An oversized body never becomes a successful partial response.
Requests allow at most 64 headers and 16 KiB of header names and values. Host-managed
credential, routing and connection headers cannot be overridden. Response headers
are limited to content-type, content-encoding and retry-after, each at most
4 KiB. Response bytes retain their content encoding; the client removes HTTP
transfer framing but does not decompress content. Evaluators interpret the provider
payload and can explicitly retry within their remaining allowances.
The local evaluator test command has no worker attempt authority and cannot issue
HTTP requests. Networking tests use the named evaluator HTTP service test tier.