[GH-ISSUE #480] [BUG] redis WARN: CROSSSLOT #2242

Closed
opened 2026-03-15 19:49:58 +03:00 by kerem · 3 comments
Owner

Originally created by @ChnMig on GitHub (Jun 2, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/480

Originally assigned to: @hibiken on GitHub.

Describe the bug
When I set redis to cluster mode and connect using asynq.RedisClusterClientOpt, asynq reports frequent errors:WARN: recoverer: could not move task to archive: INTERNAL_ERROR: redis eval error: CROSSSLOT Keys in request don't hash to the same slot

To Reproduce
When he starts, it will definitely reappear

Environment (please complete the following information):

  • OS: [e.g. MacOS, Linux]
  • Version of asynq package 0.23.0
Originally created by @ChnMig on GitHub (Jun 2, 2022). Original GitHub issue: https://github.com/hibiken/asynq/issues/480 Originally assigned to: @hibiken on GitHub. **Describe the bug** When I set redis to cluster mode and connect using `asynq.RedisClusterClientOpt`, `asynq` reports frequent errors:`WARN: recoverer: could not move task to archive: INTERNAL_ERROR: redis eval error: CROSSSLOT Keys in request don't hash to the same slot` **To Reproduce** When he starts, it will definitely reappear **Environment (please complete the following information):** - OS: [e.g. MacOS, Linux] - Version of `asynq` package 0.23.0
kerem 2026-03-15 19:49:58 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@hibiken commented on GitHub (Jun 3, 2022):

@ChnMig Thank you for reporting an issue.
Based on the error message you provided, it seems that error is returned from this call to Archive (github.com/hibiken/asynq@6c954c87bf/recoverer.go (L123-L125)).

If you look at the implementation of the Archive, it should all have the same hash tag of {qname} github.com/hibiken/asynq@6c954c87bf/internal/rdb/rdb.go (L824-L867))

Do you have queue name or TaskID with {} in the string?

<!-- gh-comment-id:1145914377 --> @hibiken commented on GitHub (Jun 3, 2022): @ChnMig Thank you for reporting an issue. Based on the error message you provided, it seems that error is returned from this call to `Archive` (https://github.com/hibiken/asynq/blob/6c954c87bf8c1aaca55ab824b47125d2359eea91/recoverer.go#L123-L125). If you look at the implementation of the `Archive`, it should all have the same hash tag of `{qname}` https://github.com/hibiken/asynq/blob/6c954c87bf8c1aaca55ab824b47125d2359eea91/internal/rdb/rdb.go#L824-L867) Do you have queue name or TaskID with `{}` in the string?
Author
Owner

@ChnMig commented on GitHub (Jun 7, 2022):

@hibiken Ok, I have changed to standalone redis for now, but I will try it in my free time, I will close this issues first, when I have conclusion, I will let you know here, thanks for your help

<!-- gh-comment-id:1148138114 --> @ChnMig commented on GitHub (Jun 7, 2022): @hibiken Ok, I have changed to standalone redis for now, but I will try it in my free time, I will close this issues first, when I have conclusion, I will let you know here, thanks for your help
Author
Owner

@misterGF commented on GitHub (Nov 18, 2023):

I experienced a similar issue. My error was WARN: recoverer: could not move task to archive: INTERNAL_ERROR: redis eval error: NOT FOUND

This happened after I mucked up a record in redis. I was trying to edit it manually and something went awry.

I fixed it by looking at my keys for something that seemed different from my staging environment.

I spotted a key that existed in the staging environment

asynq:{default}:active | ["0c8ff109-6d22-4dcf-aedb-749e90c96e94"]

I ended up renaming the key name to "a" to test if it it would fix it and it did!

Probably could have fixed it by removing that id in the value as well. Hope this helps someone.

<!-- gh-comment-id:1817366327 --> @misterGF commented on GitHub (Nov 18, 2023): I experienced a similar issue. My error was **WARN: recoverer: could not move task to archive: INTERNAL_ERROR: redis eval error: NOT FOUND** This happened after I mucked up a record in redis. I was trying to edit it manually and something went awry. I fixed it by looking at my keys for something that seemed different from my staging environment. I spotted a key that existed in the staging environment **asynq:{default}:active** | ["0c8ff109-6d22-4dcf-aedb-749e90c96e94"] I ended up renaming the key name to "a" to test if it it would fix it and it did! Probably could have fixed it by removing that id in the value as well. Hope this helps someone.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#2242
No description provided.