Loki ingestion is failing with `stream limit exceeded` and the ingester memory is exploding. What happened?

IntermediateScenarioLogging Pipelines
Answer

Situation read → A high-cardinality label was added to log streams. Every unique label set is a new stream, so Loki is creating millions of tiny streams.

What I'd do →

  1. Find the offending label: logcli series '{}' --analyze-labels or check loki_ingester_memory_streams per tenant.
  2. Remove labels like request_id, user_id, pod_ip, status_code from the shipper config; keep them in the log line.
  3. Query them at read time with | json | user_id="42" or structured metadata (Loki 3.x).
  4. Keep max_global_streams_per_user as a guardrail rather than raising it blindly.

Why → Loki indexes labels only. Few labels with high volume per stream is the design point.

Interview tip → Rule of thumb: labels describe where a log came from, not what it says.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines