Skip to main content

Runtime Limits

These process-level settings bound evaluator execution resource use. They can be supplied as CLI flags or environment variables.

Wasm Evaluator Isolation

Each evaluator invocation runs in a fresh Wasmtime store with CPU, memory, table, instance, timeout, and logging limits. Workers also use a process-wide semaphore so many valid evaluators cannot exhaust host resources at the same time.

FlagEnvironmentDefaultPurpose
--wasm-max-memory-bytesVIGILO_WASM_MAX_MEMORY_BYTES67108864Maximum linear memory bytes per evaluator invocation.
--wasm-max-table-elementsVIGILO_WASM_MAX_TABLE_ELEMENTS10000Maximum table elements per evaluator invocation.
--wasm-max-instancesVIGILO_WASM_MAX_INSTANCES1Maximum component instances per evaluator invocation.
--wasm-max-memoriesVIGILO_WASM_MAX_MEMORIES1Maximum linear memories per evaluator invocation.
--wasm-max-tablesVIGILO_WASM_MAX_TABLES2Maximum tables per evaluator invocation.
--wasm-fuel-per-evaluationVIGILO_WASM_FUEL_PER_EVALUATION50000000Wasmtime fuel budget for deterministic CPU interruption.
--wasm-timeout-msVIGILO_WASM_TIMEOUT_MS5000Wall-clock timeout enforced by epoch interruption.
--wasm-epoch-tick-interval-msVIGILO_WASM_EPOCH_TICK_INTERVAL_MS10Epoch ticker granularity used for timeout checks.
--wasm-max-concurrent-evaluationsVIGILO_WASM_MAX_CONCURRENT_EVALUATIONS8Hard process-local cap on active Wasm evaluator invocations.
--wasm-max-log-message-bytesVIGILO_WASM_MAX_LOG_MESSAGE_BYTES4096Maximum bytes retained from each evaluator host log message.
--wasm-max-log-messagesVIGILO_WASM_MAX_LOG_MESSAGES128Maximum 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.

Outbound evaluator HTTP remains denied unless a future policy explicitly enables it.