VictoriaMetrics / Prometheus-compatible backend logs `cannot parse sample: too long label value`
IntermediateTroubleshootingPrometheus storage, memory and cardinality
Answer
Likely causes → A label carries a huge string (SQL query, stack trace, JSON blob).
Diagnose → Find the source: curl -s app/metrics | awk 'length > 1000' | head.
Fix → Remove that label in the app; drop it at scrape with labeldrop. Configure label_value_length_limit on the scrape job so Prometheus rejects it early.
Prevent → Set label_limit, label_name_length_limit and label_value_length_limit as global defaults.
More on Prometheus storage, memory and cardinality
Prometheus pod restarts with `OOMKilled` every few hoursIntermediateA 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 restartAdvanced