Interview Prep/Monitoring & Observability/Prometheus storage, memory and cardinality

Thanos Store Gateway is OOMKilled on startup

AdvancedTroubleshootingPrometheus storage, memory and cardinality
Answer

Likely causes → It loads index headers for every block in a large bucket, or blocks were never downsampled/compacted.

Diagnose → Count blocks with thanos tools bucket inspect; check thanos_bucket_store_blocks_loaded.

Fix → Shard stores by time (--min-time=-30d --max-time=-2d) or by hash relabel, enable compactor downsampling, give the store fast local disk for index-header cache.

Prevent → Keep the compactor healthy; it is the main lever on store memory.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus storage, memory and cardinality