observability: log-trigger subscriber-lagged WARN feeds itself and can fill the disk
Summary
On a long-lived engine with iii-observability enabled and logs_console_output: true (the documented default in several configs), the worker emits:
[WARN] iii::workers::observability Log trigger subscriber lagged, some logs were skipped
└ skipped: 1That WARN is written to stdout and captured by the same log-trigger subscriber it is complaining about. Once the subscriber falls behind, this becomes a positive-feedback loop at hundreds of lines per millisecond. Capturing engine stdout (e.g. nohup iii >> iii-engine.log) then grows without bound.
On iii 0.22.1 this filled iii-engine.log to ~401 GB and the host disk to 100%. The same message / loop was previously reported against an iii embedder: rohitg00/agentmemory#519 (137 GB; another comment there of 400 GB in a few hours). That issue was closed by changing wrapper defaults, not the engine path.
This is not #2008 (baggage InvalidKeyValueFormat warn flood) and not #2068 (trace-archive SQLite vacuum / disk reclaim).
Environment
- OS: macOS Apple Silicon (darwin 24.x)
- iii / iii-worker: 0.22.1 (
~/.local/bin) - Engine:
iii --config config.yaml(HTTP :3111, engine WS :49134), process left running for ~8 days - Observability (at the time of the fill):
enabled: true,logs_enabled: true,logs_exporter: memory,logs_console_output: true,logs_sampling_ratio: 1.0 - Stdout capture: append-only
nohup iii --config config.yaml >> logs/iii-engine.log(no rotation)
Expected behavior
- A lagged log-trigger subscriber should be reported once (or rate-limited) and must not enqueue another observability log event.
- Engine stdout should remain usable for ops; a single WARN class must not be able to fill a disk.
logs_console_output: trueshould not turn internal subscriber back-pressure into a tight loop.
Actual behavior
Tail of the 401 GB file (timestamp from a single millisecond, repeating indefinitely):
[02:41:39.379 PM] [WARN] iii::workers::observability Log trigger subscriber lagged, some logs were skipped
└ skipped: 1
[02:41:39.379 PM] [WARN] iii::workers::observability Log trigger subscriber lagged, some logs were skipped
└ skipped: 1(hundreds of identical lines per ms; skipped: 1 each time)
Engine pid was still listening and writing. Stopping the process and deleting the log reclaimed ~400 GB.
Steps to reproduce
Run iii 0.22.1 with
iii-observabilityand:logs_enabled: true logs_console_output: true logs_sampling_ratio: 1.0Capture stdout unbounded (
iii --config config.yaml >> engine.log 2>&1or equivalent).Generate enough log volume that the log-trigger broadcast subscriber lags (
RecvError::Lagged), or wait on a long-lived engine under normal worker traffic.Observe the WARN above repeating without bound and the capture file growing at hundreds of MB/hour once the loop starts.
Root cause (hypothesis)
Same as agentmemory#519: engine/src/workers/observability/otel.rs emits tracing::warn! when the log-trigger broadcast subscriber returns RecvError::Lagged. That warn is captured by the tracing layer that feeds the observability log store / console output, so warning about lag adds another event to the queue the subscriber is already failing to drain.
String still present in the 0.22.1 binary / source (from the earlier report):
Log trigger subscriber lagged, some logs were skipped
engine/src/workers/observability/otel.rsWorkarounds (consumer)
- Set
logs_console_output: false. - Rotate / cap the file that captures engine stdout (do not truncate while the process still holds the fd).
- Stop the engine to break the loop; space is not reclaimed until the writer exits.
These stop the disk fill. They do not fix the feedback loop if something else still records those WARNs.
Suggested fixes
- Emit the lag message via
eprintln!/ a tracing target that is excluded from the log-trigger subscriber, or rate-limit/dedupe it (one line per N seconds with a skip count). - Default
logs_console_outputtofalsefor long-lived / production-shaped configs. - Document that capturing engine stdout without rotation is unsafe while this WARN can loop.
Happy to retest a build.
Source: iii-hq/iii