My docker redis instance is running out of memory constantly and my website drops with the message that redis is loading the dataset in memory

I have set up my docker container with max 10GB and in redis.conf I added

maxmemory 6gb
lazyfree-lazy-eviction yes
lazyfree-lazy-expire yes
lazyfree-lazy-server-del yes
replica-lazy-flush yes
lazyfree-lazy-user-del yes
maxmemory-policy allkeys-lru

So I would assume that the data should get evicted when maxmemory is reached.

However, the container shows 10GB / 10GB memory used, and it's constantly failing after a couple of days.

This only happens to my magento2 website.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.