File size: 1,978 Bytes
d086025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Runbook: High Memory Usage

**Severity:** P3
**Impact:** Degraded performance, potential OOM kills
**On-Call Action:** Investigate within 4 hours

## Symptoms

- [ ] Memory usage > 90% of configured limit
- [ ] Node becoming slow or unresponsive
- [ ] OOM killer messages in system logs
- [ ] Increased request latency
- [ ] `guts_process_resident_memory_bytes` exceeding threshold

## Detection

**Alert Name:** `GutsHighMemoryUsage`

**Query:**

Or system-level:

**Dashboard:** Node Exporter → Memory Usage

## Diagnosis

### Step 1: Check Current Memory Usage


### Step 2: Check Memory Trends


### Step 3: Identify Memory Consumers


### Step 4: Check for Memory Leaks


If memory continuously grows without plateau, likely a leak.

### Step 5: Check Recent Changes


## Resolution

### Option A: Restart Node (Quick Fix)

If immediate relief needed:


### Option B: Reduce Cache Size


### Option C: Limit Concurrent Connections


### Option D: Tune RocksDB Memory


### Option E: Clear Memory Caches


### Option F: Add Memory (If Undersized)

For systemd-managed nodes:


For Kubernetes:


## Investigation: Memory Leak

If memory continuously grows:

### Step 1: Enable Memory Profiling


### Step 2: Collect Heap Dump


### Step 3: Analyze


## Prevention

### Set Memory Limits

Always set memory limits in production:



### Configure OOM Handling


### Monitor Memory Trends

Set up alerting for gradual growth:


## Escalation

If memory issues persist after optimization:

1. **Collect diagnostics:**

2. **File issue:**
   - Include: Memory profile, configuration, workload description
   - Tag: `memory-leak` if growth is unbounded

## Post-Incident

- [ ] Verify memory usage stabilized
- [ ] Document optimal configuration
- [ ] Update resource allocations if undersized
- [ ] Set up trend-based alerting
- [ ] Review capacity planning

## Related Runbooks

- [High CPU](high-cpu.md)
- [Disk Full](disk-full.md)
- [Node Not Syncing](node-not-syncing.md)