field note 015 · 2026-08-11 · observability, loki
every service looked dead for 16.5 hours, and the only thing broken was a batch size
one evening every service in the fleet stopped logging at once. the services were fine. the log pipeline had wedged itself on a single batch that had grown past what loki would accept, and it was never going to recover on its own.
the setup
we run infrastructure for a blockchain data-indexing company, and the fleet ships its logs over otlp (the opentelemetry protocol) to one monitoring box running loki and grafana. two collectors sit in a chain on that box: our front collector takes logs from every service and batches them, and a second collector inside the loki/grafana container forwards them to loki.
at 21:31 utc on august 11, alerts started firing: a "backlog growth" alert on the inner collector's queue, and "no data in the last 5 minutes" for 12 services at once. that pattern had fooled us before.
the lookalike
three weeks earlier, on july 21, every service's newest log in loki read the same timestamp, and queries for anything later came back empty. we called it a fleet-wide blackout. it was ingestion lag. loki had fallen about 90 minutes behind, and when we looked again about an hour later it had caught up and backfilled the whole gap with nobody touching it.
so the obvious read this time was "it'll catch up." this one never would.
what was actually happening
loki's distributor hands each batch to its ingester over grpc (a remote procedure call protocol), and the default size cap on that hop is 4 MiB (4,194,304 bytes). our front collector batched every 5 seconds with a target of 16,384 records, which by then meant about 5,000 records, or roughly 6 MB, per batch. loki answered with a 503 that named the problem exactly: received message larger than max (8818934 vs. 4194304).
a 503 reads as "try again later," so the collector did, with the same oversized batch, forever. nothing about the batch changed between retries, so nothing about the answer did either. zero logs landed until we fixed it at 14:10 utc the next day.