Not planning and configuring the memory properly
The Redis server needs enough memory to perform backups if any strategy is enabled. In the worst-case scenario, redis-server may double the used memory during the backup.
During RDB snapshot creation and AOF rewriting, redis-server needs to duplicate itself (it executes the fork() system call). Chapter 8, Scaling Redis (Beyond a Single Instance), will introduce AOF and RDB, with details.
If the Redis instance is very busy during the fork() call, it is possible that the copy-on-write strategy and overcommitting the memory is not enough. In this case, the child process may need the same amount of memory (or an amount very close to it) as the parent.
Assuming that Linux is the operating system, set the overcommit memory configuration to 1 to boost background saves. Add the following to the /etc/sysctl.conf file:
vm.overcommit_memory=1
After saving /etc/sysctl.conf, reboot the server.
There is a configuration directive called maxmemory that limits the...