-
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
Understanding clusterRetryStrategy (after Failed to refresh slots cache) #1062
Comments
I'm experiencing something similar. I will investigate and let you know if i find anything. |
Having a similar issue. Eventually our node.js apps start hitting that error repeatedly and get stuck in an infinite loop. After restarting the app, connection to redis is reestablished. |
I too see that the error is being thrown before From the Readme:
This seems clear that if clusterRetryStrategy is defined and returns a number an error will not be generated. |
ioredis version: 4.15.1
Running on elasticache cluster. Code via lambda.
Everything works flawlessly most of the time. However as our project is scaling up, very occasionally we have started seeing
Failed to refresh slots cache
errors, especially in our longer running scripts.It's my understanding that
clusterRetryStrategy
should be called before ioredis throws any errors. From ioredis readme:However, our logs are showing an error before
clusterRetryStrategy
is called (we are logging from the retry function).In addition, we are returning a number from
clusterRetryStrategy
, but it doesn't seem to have any effect.clusterRetryStrategy
is only called once with1
as the argument, and then the error flow begins and our code fails.In Summary:
clusterRetryStrategy
is ever called? (If not I think there's a bug).clusterRetryStrategy
to actually cause a reconnection? Are we supposed to be catching these errors somewhere so that ioredis actually has time to retry?The text was updated successfully, but these errors were encountered: