Prometheus pod restarts with `OOMKilled` every few hours
IntermediateTroubleshootingPrometheus storage, memory and cardinality
Answer
Likely causes → Too many active series in the head block (cardinality growth), heavy queries loading long ranges, or memory limits sized for last year's load.
Diagnose →
kubectl describe pod prometheus-k8s-0 -n monitoring | grep -A3 'Last State'
prometheus_tsdb_head_series
topk(10, count by (__name__)({__name__=~".+"}))
Use Status → TSDB Status for top series by metric and label.
Fix → Drop the offending series with metric_relabel_configs, add query limits (--query.max-samples), and size memory at roughly a few KB per active series plus query headroom.
Prevent → Alert on prometheus_tsdb_head_series growth and per-job scrape_series_added.
More on Prometheus storage, memory and cardinality
A query fails with `query processing would load too many samples into memory in query execution`IntermediateHead series jumped from 2M to 9M after a deployAdvancedPrometheus logs `opening storage failed: ... unexpected EOF` / `corruption in segment` and won't startAdvancedPrometheus is in CrashLoopBackOff with `no space left on device`BeginnerPrometheus takes 15 minutes to become ready after a restartAdvancedPrometheus is killed by the liveness probe during startup in a loopIntermediate