How can we help you today?

How to Solve Redis Error "OOM command not allowed when used memory > ‘maxmemory’"

Created by: Sophie van Vrijberghe de Coningh

Modified on: Wed, 27 May, 2020 at 4:23 PM


This error appears if Magento is trying to store more data in the Redis cache then possible.

TABLE OF CONTENTS

Verifying Memory Usage of Your Redis Instance

You can see the memory values by using the redis-cli:

redis-cli info memory
 
# Memory
used_memory:894168
used_memory_human:873.21K
used_memory_rss:9293824
used_memory_peak:1181776
used_memory_peak_human:1.13M
used_memory_lua:33792
mem_fragmentation_ratio:10.39
mem_allocator:jemalloc-3.6.0

Fix It

You can try to fix this using compression on the Redis data, but most of the time this will only temporary ban out the problem. After a while, when the Redis cache is completely filled up again, the errors will re-appear.

If you store both the Magento caches (FPC and cache) and the sessions in Redis, it could help moving the sessions from memory to files or the database, but this can cause increase in load times.

Another fix could be removing your staging environment from the Hypernode, leaving the staging memory for the production website. (Don’t forget to clear it’s caches too!)

To solve this issue there is only one real fix: Upgrade to a bigger node that has more memory.

S
Sophie is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.