ClusterAllFailedError on version 4.24.1
See original GitHub issueHey! We’re using ioredis with our AWS ElastiCache cluster running 3 shards on version 5.0.5. We’re making the redis calls through a lambda with quite high traffic, meaning multiple concurrent lambdas running.
I’ve done some version bumping and I’m seeing the error ClusterAllFailedError: Failed to refresh slots cache
intermittently. Through some debugging I’ve narrowed version 4.24.1 to be the culprit - any version before that works fine. When setting DEBUG=ioredis:*
in the lambda env the ClusterAllFailedError: Failed to refresh slots cache
is in most cases followed by these logs:
ioredis:cluster:connectionPool Reset with []
ioredis:cluster:connectionPool Disconnect <ip>:<port> because the node does not hold any slot
ioredis:cluster:connectionPool Remove <ip>:<port> from the pool
When looking at the 4.24.1 commit https://github.com/luin/ioredis/commit/8524eeaedaa2542f119f2b65ab8e2f15644b474e I can tell that code related to this error has been touched - could this fix have introduced unintended issues? Any pointers would be appreciated 👍
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (2 by maintainers)
Top GitHub Comments
Thanks, @vaughandroid for sharing your experience, it is really insightful and helpful.
The problem which I faced was pretty much stupid, because of the wrong
tls
configuration, we are facing a connection issue with AWS Redis.AWS ElasticCache Clustered without TLS and AUTH
The problematic situation for the developer:
The IORedis doesn’t provide the right information for generated error.
When we try to replicate the issue locally with a trial and error approach, we received the same error for the following case
tls
configurationNow, you see it is difficult to process the error details for the above use cases and act on them. If the right error details have been provided then the developer easily gets the context of wrongdoing and s/he can take needful precautions to fix the issue.
In our case, we doubted the Redis and started looking into the performance metrics
@trademark18 I hope IORedis can consider this feedback and do the needful changes with error handling documentation
And also
client.error
callback handle such type of errors and not impacting anymore on the aws lambda functionThank you very much!
Hi all, I’m on 4.27.6 and I’m having a similar issue where I see this error just when under a heavy load:
And then the Lambda ends with this error message:
Here’s my
Redis.Cluster()
code:Questions:
Sorry to comment on a closed issue but this is the only place I’ve found anyone talking about seeing this error only under heavy load as opposed to just incorrect network configuration or similar.