Does Alloy loki.source.file pause reading when loki.write can't reach Loki?

If Loki is unreachable for an extended period (hours), does loki.source.file stop advancing the positions file and pause reading? Or does it continue reading and drop logs after max_backoff_retries is exhausted?

Basically — when Loki comes back up, will Alloy replay the missed logs from the source files, or are they lost?

Using default loki.write config (no WAL enabled).

My understanding is that Alloy will not stop reading files. This is why it’s important to configure WAL and backoff retries.

Without WAL enabled, Alloy/Loki behavior is basically “best effort” buffering in memory only.

loki.source.file will generally continue reading files and updating positions as logs are handed off downstream. If loki.write cannot deliver to Loki and retries are exhausted (max_backoff_retries), the buffered logs are dropped.

That means if Loki is unreachable for a long time and the in-memory queue fills / retries expire, those logs are lost and will not be replayed later — even though the positions file may already have advanced.

So in practice:

  • Short outages → usually fine because logs stay buffered in memory and get retried.
  • Long outages → logs can be dropped once retry limits/buffers are exceeded.
  • When Loki comes back → Alloy resumes from the latest saved positions, not from the dropped lines.

If you need guaranteed replay after extended outages, enabling the WAL is the important part because it persists pending log entries to disk instead of only memory.