This repository was archived by the owner on Apr 4, 2026. It is now read-only.
fix: survive Redis restarts with infinite reconnection policy#89
Merged
Conversation
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 warning
christopherwxyz
force-pushed
the
fix/redis-reconnection-recovery
branch
from
February 9, 2026 19:57
bb8a4ce to
fa1f855
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After a Redis restart, waypoint pods entered an infinite timeout loop and never recovered — requiring manual pod restarts.
Root cause:
ReconnectPolicy::new_exponential(3, ...)— Fred gave up reconnecting after 3 failed attempts, leaving the pool permanently dead.Fix:
max_attempts=0(infinite retries with exponential backoff up to 30s) per Fred docsEventInterface(on_error,on_reconnect,on_unresponsive) for connection event visibilityforce_reconnection()when pool state isDisconnectedinstead of just loggingTest plan
kubectl delete pod) while waypoint is running