Foundatio.Redis icon indicating copy to clipboard operation
Foundatio.Redis copied to clipboard

Error encountered when Dequeue message from redis cluster

Open edwardmeng opened this issue 7 years ago • 3 comments

We have encountered an error when dequeue message from redis cluster while sending emails

[19:23:37 ERR] Retry error: Key has MOVED from Endpoint 10.20.0.14:9001 and hashslot 9229 but CommandFlags.NoRedirect was specified - redirect not followed for RPOPLPUSH {q:gaiaworks1-MailMessage}:in. IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=0,Free=32767,Min=4,Max=32767), Local-CPU: n/a
StackExchange.Redis.RedisServerException: Key has MOVED from Endpoint 10.20.0.14:9001 and hashslot 9229 but CommandFlags.NoRedirect was specified - redirect not followed for RPOPLPUSH {q:gaiaworks1-MailMessage}:in. IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=0,Free=32767,Min=4,Max=32767), Local-CPU: n/a
   at Foundatio.Queues.RedisQueue`1.<DequeueIdAsync>b__56_0() in C:\projects\foundatio-redis\src\Foundatio.Redis\Queues\RedisQueue.cs:line 331
   at Foundatio.Utility.Run.WithRetriesAsync[T](Func`1 action, Int32 maxAttempts, Nullable`1 retryInterval, CancellationToken cancellationToken, ILogger logger) in /app/src/Foundatio/Utility/Run.cs:line 41

edwardmeng avatar Nov 20 '18 11:11 edwardmeng

You are running it in a cluster? There are going to be a bunch of issues like this that you run into with a Redis Cluster.

ejsmith avatar Nov 20 '18 13:11 ejsmith

I am testing this with a single instance and I think it is great however I am confused about the comment. Is this not designed to work when redis is clustered? What needs to change in order for it to work? Is this even realistic?

Telavian avatar Dec 10 '20 20:12 Telavian

There are some operations that we are doing that use scripting that doesn't work in the cluster mode. That said we should fully support running in sentinel. You'd need to run all the tests against a cluster to see everything that would need to be changed for clusters.

niemyjski avatar Dec 11 '20 16:12 niemyjski