cancel
Showing results for 
Search instead for 
Did you mean: 

CROSSSLOT Keys issue with Redis 7

CROSSSLOT Keys issue with Redis 7

Hi,

 I have upgraded the Magento version 2.4.3 to 2.4.7-3. After upgraded the website, I am getting below error:

CROSSSLOT Keys in request don't hash to the same slot (context='', command='sinter', original-slot='6566', wrong-slot='701', first-key='zc:ti:011_FPC',  violating-key='zc:ti:011_MAGE')

 My website is hosted on the Azure and I was used the Redis 6 with Magento old version 2.4.3. 

Now with upgraded version 2.4.7-3, I am using the Azure Redis 7 enterprise for managing the cache and session and getting the above error message.

 So can anyone please help me to fix this issue?

 Thanks

2 REPLIES 2

Re: CROSSSLOT Keys issue with Redis 7

When working with Redis 7 in a clustered environment, a CROSSSLOT Keys error occurs when a command attempts to access multiple keys that belong to different hash slots. Redis Cluster partitions data across multiple nodes espaço invisível 2025 using a hashing mechanism, and each key is assigned to a specific slot. Commands that involve multiple keys, such as transactions (MULTI/EXEC), MSET, or MGET, must operate on keys that reside in the same slot.

Re: CROSSSLOT Keys issue with Redis 7

This error occurs because Redis Cluster enforces hash slot consistency, and Magento is trying to perform operations on keys mapped to different slots. Since you upgraded from Redis 6 to Redis 7 in cluster mode, ensure that Magento’s Redis configuration is set correctly. Checking your env.php file and enabling Creative Operations Optimization can help maintain efficient cache management and prevent key conflicts. You may also need to enable consistent hashing to keep related keys in the same slot. Try flushing the Redis cache and verify that session storage is correctly namespaced. If the issue persists, consider using a single-node Redis setup instead of a cluster.