Thanos Compactor logs `critical error detected; halting` and stops compacting
AdvancedTroubleshootingPrometheus storage, memory and cardinality
Answer
Likely causes → Overlapping blocks in the bucket (two sidecars with identical external labels), or a corrupt block.
Diagnose →
thanos tools bucket verify --objstore.config-file=bucket.yml
thanos tools bucket inspect --objstore.config-file=bucket.yml
Check thanos_compact_halted == 1.
Fix → Give each Prometheus unique external_labels (including replica), mark the bad block with thanos tools bucket mark --marker=no-compact-mark.json or delete it, then restart the compactor. Use --deduplication.replica-label=replica.
Prevent → Alert on thanos_compact_halted, and run exactly one compactor per bucket.
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