A Grafana panel using `rate(http_requests_total[30d])` fails with `query processing would load too many samples into memory in query execution`.
IntermediateTroubleshootingPrometheus SLIs & Recording Rules
Answer
Likely causes → A raw 30-day range over many series exceeds Prometheus' --query.max-samples limit (default 50,000,000).
Diagnose → Count series behind the selector and estimate samples: series x (30d / scrape interval).
count(http_requests_total{job="checkout"})
Fix → Pre-aggregate with recording rules (record 5m rates per SLO, then compute longer windows from those, in a slow-evaluated group), drop unneeded labels, or use a long-term store (Thanos, Mimir) with downsampling.
Prevent → Dashboards and alerts for SLOs read only recording rules, never raw high-cardinality metrics over long ranges.
More on Prometheus SLIs & Recording Rules
You applied a `PrometheusRule` for your SLO, but `slo:sli_error:ratio_rate5m` returns nothing in Prometheus.Beginner`promtool check rules` fails with `could not parse expression: 1:72: parse error: unexpected right parenthesis ')'`.BeginnerThe availability SLI panel shows `NaN` every night between 02:00 and 05:00.BeginnerYour per-route SLI query fails with `found duplicate series for the match group {route="/api/checkout"} on the right hand-side of the operation`.IntermediatePrometheus logs `vector contains metrics with the same labelset after applying rule labels` for your SLI recording rule.AdvancedYour latency SLI using `le="0.3"` returns an empty result, but the histogram exists.Intermediate