-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto reconnect doesn't work under certains circumstances #1007
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 7 days if no further activity occurs, but feel free to re-open a closed issue if needed. |
Still an active bug |
I also have encountered the same issue. With Here are some logs:
@luin were you able to investigate about this issue? Thanks! |
happening on idle lamdas as well |
+1 |
when debuging, we see:
|
reproduced method:
|
🎉 This issue has been resolved in version 4.17.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The error still here, even with the version 4.17.3... |
## [4.17.3](redis/ioredis@v4.17.2...v4.17.3) (2020-05-30) ### Bug Fixes * race conditions in `Redis#disconnect()` can cancel reconnection unexpectedly ([6fad73b](redis/ioredis@6fad73b)), closes [#1138](redis/ioredis#1138) [#1007](redis/ioredis#1007)
Hello,
When ready check is on and an MaxRetriesPerRequestError happens, a recoverFromFatalError is called in the ready check causing disconnect(true) to be called and will lead to abort to reconnection process.
This is leading us in a situation where express session associated to redisStore isn't working anymore.
a quick and dirty fix for us is to disable ready check or set MaxRetriesPerRequest to -1
Our case to test the bug:
ioredis express client connected as a standalone redis configuration to redis-ha chart with haproxy enabled and 3 redis/sentinel behind. (haproxy is routing all requests to the master node)
kill or scale to 0 haproxy.
ioredis is entering the autoreconnect loop (with retrystrategy)
Adding this stack to help :
The text was updated successfully, but these errors were encountered: