Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Trace queue settings

The async trace pipeline: POST /{channel}/async enqueues and workers execute. Failures land in a database dead-letter queue with automatic retry.

Synopsis

[trace_queue]
workers = 4
buffer_size = 1000
shutdown_timeout_secs = 30
retention_hours = 72
cleanup_interval_secs = 3600
processing_timeout_ms = 60000
max_result_size_bytes = 1048576
max_queue_memory_bytes = 104857600
dlq_retry_enabled = true
dlq_max_retries = 5
dlq_poll_interval_secs = 30
dlq_batch_size = 20
dlq_lease_secs = 60

Options

SettingDefaultEnv varWhen to change
trace_queue.workers4ORION_TRACE_QUEUE__WORKERSRaise for more concurrent async processing. This is the real worker knob.
trace_queue.buffer_size1000ORION_TRACE_QUEUE__BUFFER_SIZERaise to absorb bigger bursts before submissions are rejected.
trace_queue.shutdown_timeout_secs30ORION_TRACE_QUEUE__SHUTDOWN_TIMEOUT_SECSHow long shutdown waits for in-flight traces.
trace_queue.retention_hours72ORION_TRACE_QUEUE__RETENTION_HOURSLower to shrink the traces table; 0 keeps traces forever.
trace_queue.cleanup_interval_secs3600ORION_TRACE_QUEUE__CLEANUP_INTERVAL_SECSHow often the trace cleanup job runs.
trace_queue.processing_timeout_ms60000ORION_TRACE_QUEUE__PROCESSING_TIMEOUT_MSPer-trace deadline on the async path.
trace_queue.max_result_size_bytes1048576ORION_TRACE_QUEUE__MAX_RESULT_SIZE_BYTESRaise for large results; oversized ones are rejected (sync) or failed (async).
trace_queue.max_queue_memory_bytes104857600ORION_TRACE_QUEUE__MAX_QUEUE_MEMORY_BYTESTotal queued payload bytes before new submissions get 503.
trace_queue.dlq_retry_enabledtrueORION_TRACE_QUEUE__DLQ_RETRY_ENABLEDDisable only to freeze the DLQ for inspection — note the orion_trace_dlq_depth gauge stops updating with it.
trace_queue.dlq_max_retries5ORION_TRACE_QUEUE__DLQ_MAX_RETRIESAttempts before a row is marked exhausted. Must be 1–16 (backoff is 2^retries seconds); use dlq_retry_enabled to turn retries off.
trace_queue.dlq_poll_interval_secs30ORION_TRACE_QUEUE__DLQ_POLL_INTERVAL_SECSHow often the retry worker polls.
trace_queue.dlq_batch_size20ORION_TRACE_QUEUE__DLQ_BATCH_SIZERows claimed per retry tick. Raise to drain a large backlog faster.
trace_queue.dlq_lease_secs60ORION_TRACE_QUEUE__DLQ_LEASE_SECSHow long a claimed row stays leased to one node.

Last verified 14 September 2026