Redis memory consumption is too high and it crashes

357 views
Skip to first unread message

Sunil Yadav

unread,
Mar 2, 2022, 11:24:31 AM3/2/22
to Redis DB
Hi Team,

I'm using Redis.

Redis is running on an Linux machine with 8GB of RAM.

This is our production server and it crashes every time when we have high uses might be due to the low memory consumption.

Would you please help me out to stable our production server?

Thanks.

Oscar Besga

unread,
Mar 2, 2022, 3:13:30 PM3/2/22
to Redis DB
It crashes ? It doesn't give a memoery error ?
Set a maxmemory configuration value (a little less of these 8Gb of RAM) and an eviction policie to autodiscard data
See here

madhava mk

unread,
Mar 3, 2022, 11:07:34 AM3/3/22
to Redis DB
If you have max memory of 8gb, better to have your dataset fitting in half of that. There are scenarios wherein the master node might require to use exact same amount of memory as data set to replicate onto slave node. So, at that point in time, memory usage might shoot up.

Also, as mentioned above, you need to setup cache eviction policy. 

One more option is to shard out your data if the dataset keeps growing.

Thanks,
Madhava

Reply all
Reply to author
Forward
0 new messages