Prometheus OOMKilled Due to High Label Cardinality Explosion

Unbounded values (user_id, request_id, full URL) were placed in metric labels.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: Prometheus OOMKilled Due to High Label Cardinality Explosion Platform: Observability
Common Root Causes:
  • Unbounded values (user_id, request_id, full URL) were placed in metric labels.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Drop high-cardinality labels via `metric_relabel_configs` and use route templates (`/users/:id`).
Safe Diagnostic Command:
curl -s localhost:9090/api/v1/status/tsdb | jq .data.seriesCountByMetricName
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Unbounded values (user_id, request_id, full URL) were placed in metric labels. Recommended diagnostic: `curl -s localhost:9090/api/v1/status/tsdb | jq .data.seriesCountByMetricName`. Remediation: Drop high-cardinality labels via `metric_relabel_configs` and use route templates (`/users/:id`).

Worked Examples

  • Run `curl -s localhost:9090/api/v1/status/tsdb | jq .data.seriesCountByMetricName` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-prometheus-high-cardinality-oom · Independently verified: 2026-11-25

Related Resources