27 May

Redis: “Can’t save in background: fork: Cannot allocate memory”

If you get this error

Can't save in background: fork: Cannot allocate memory

it means that your current database is bigger than memory you have. To fix the issue enable vm.overcommit_memory:

sysctl vm.overcommit_memory=1

To have if after reboot add this line to /etc/sysctl.conf:

vm.overcommit_memory=1


One thought on “Redis: “Can’t save in background: fork: Cannot allocate memory”

Leave a Reply

Your email address will not be published. Required fields are marked *