This repository was archived by the owner on Apr 4, 2026. It is now read-only.
Commit d06d921
authored
fix: survive Redis restarts with infinite reconnection policy (#89)
The reconnect policy was configured with max_attempts=3, meaning Fred
would give up reconnecting after 3 failed attempts. After a Redis
restart, the pool would permanently die and all operations would
timeout forever — requiring pod restarts to recover.
Changes:
- Set ReconnectPolicy max_attempts=0 (infinite retries with exp backoff)
- Add 50ms jitter to reconnect delays to prevent thundering herd
- Wire up Fred EventInterface (on_error, on_reconnect, on_unresponsive)
for connection visibility
- Health monitor now calls force_reconnection() when pool is
disconnected instead of just logging a warning1 parent 5a64428 commit d06d921
1 file changed
Lines changed: 28 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
121 | 139 | | |
122 | | - | |
123 | 140 | | |
124 | 141 | | |
125 | 142 | | |
126 | 143 | | |
127 | 144 | | |
128 | 145 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
133 | 151 | | |
134 | 152 | | |
135 | | - | |
136 | 153 | | |
137 | 154 | | |
138 | 155 | | |
| |||
0 commit comments