Redis if Large insert and Background Save to Disk Failed

Large insert into Redis Server cause many RDB: Background Save to Disk

You maybe get Error in your redis log like:

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

SOLUTION

Edit File: /etc/sysctl.conf
Put this at the end of line (Put in the bottom of file):

vm.overcommit_memory=1

Restart Sysctl to Get new CONFIG

sudo sysctl -p /etc/sysctl.conf

Optional, restart your redis server

/etc/init.d/redis-server restart 
or
systemctl restart redis-server

SOURCE

https://stackoverflow.com/questions/11752544/redis-bgsave-failed-because-fork-cannot-allocate-memory

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.