A Loki answer has a size cap

Systemorph/MeshWeaver#8283. On 2026-12-02 at 05:35:58Z, collection for one namespace failed on every pass, and the incident log-collection-down-… reopened. Every query timed out after 45 s (TaskCanceledException). The slice shrank as designed, 15 → 7.5 → 3.75 → 1.9 → 1 minute. Then it held at its one-minute floor, still failing on the same minute, and the cursor never moved.

What the readings showed

The rule

A query that times out now halves the namespace's page size as well as its slice; a 429 or 5xx, which is Loki's load rather than the page's size, still narrows only the slice. The page size never drops below LogWatcherOptions.MinQueryLimit (default 250) and is not grown back while the process runs. Smaller pages are cheap, because the truncated-page loop reads the window on page by page within the pass budget. A page size that once went over the cap would only fail again, and each failure costs a 45 s timeout.

Raising Loki's grpc_server_max_{send,recv}_msg_size is the server-side half. It belongs to the Loki release's configuration, not to the watcher, and the watcher must not depend on it.

Code

src/MeshWeaver.LogWatcher/LogWatchWorker.cs (ShrinkSpan, LimitFor) and LogWatcherOptions.MinQueryLimit. Test: src/MeshWeaver.Observability.Test/AnOversizedPageIsReadInSmallerPagesTest.cs runs a fake Loki that times out any answer over 1,000 lines. Without the change it fails: the page stays at 5,000 lines and no query is ever answered.