warning
5.4.1. Ruby heap live slots high
Ruby heap has too many live slots (> 500k), heap bloat
# Threshold is a rough default. Adjust based on your application's normal heap size.
- alert: RubyHeapLiveSlotsHigh
expr: ruby_heap_live_slots > 500000
for: 5m
labels:
severity: warning
annotations:
summary: Ruby heap live slots high (instance {{ $labels.instance }})
description: "Ruby heap has too many live slots (> 500k), heap bloat\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" warning
5.4.2. Ruby heap free slots high
Ruby heap has too many free slots (> 500k), memory fragmentation after large allocations
- alert: RubyHeapFreeSlotsHigh
expr: ruby_heap_free_slots > 500000
for: 5m
labels:
severity: warning
annotations:
summary: Ruby heap free slots high (instance {{ $labels.instance }})
description: "Ruby heap has too many free slots (> 500k), memory fragmentation after large allocations\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" warning
5.4.3. Ruby major GC rate high
Ruby is performing too many major GC cycles, indicating memory pressure
# Major GC rate > 5/s only fires if the app is essentially non-functional. Threshold of 2/s provides earlier detection.
- alert: RubyMajorGCRateHigh
expr: rate(ruby_major_gc_ops_total[5m]) > 2
for: 5m
labels:
severity: warning
annotations:
summary: Ruby major GC rate high (instance {{ $labels.instance }})
description: "Ruby is performing too many major GC cycles, indicating memory pressure\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" warning
5.4.4. Ruby RSS high
Ruby process RSS is high (> 1GB)
- alert: RubyRSSHigh
expr: ruby_rss > 1e9
for: 5m
labels:
severity: warning
annotations:
summary: Ruby RSS high (instance {{ $labels.instance }})
description: "Ruby process RSS is high (> 1GB)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" warning
5.4.5. Ruby allocated objects spike
Ruby is allocating objects at a high rate
- alert: RubyAllocatedObjectsSpike
expr: rate(ruby_allocated_objects_total[5m]) > 100000
for: 5m
labels:
severity: warning
annotations:
summary: Ruby allocated objects spike (instance {{ $labels.instance }})
description: "Ruby is allocating objects at a high rate\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"