Automatic redis reconnect on timeout with exponential backoff? (feature request)
- Dominant language
- JavaScript
- Stars
- 9.4k
- Forks
- 858
- PR merge metrics
- No merged PRs in 30d
Description
I'm sometimes getting
``` javascript
19:27:12 worker.1 | events.js:160
19:27:12 worker.1 | throw er; // Unhandled 'error' event
19:27:12 worker.1 | ^
19:27:12 worker.1 |
19:27:12 worker.1 | Error: Redis connection to 192.168.99.100:6379 failed - read ETIMEDOUT
19:27:12 worker.1 | at exports._errnoException (util.js:896:11)
19:27:12 worker.1 | at TCP.onread (net.js:556:26)
```
out of nowhere when using kue. Shouldn't this module attempt to automatically reconnect (with exponential backoff) when the redis client emits this error? It feels like it should be the responsibility of this module to handle this error gracefully and perhaps throw an error if reconnect fails after multiple attempts.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files or tests; start by tracing where Kue creates and handles its Redis client and how timeout errors are surfaced. Define the expected reconnect, exponential-backoff, and repeated-failure behavior, then verify that timeout errors no longer terminate the worker unexpectedly and that failed reconnection is reported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, redis
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100