Redis 故障

错误信息

1
2
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.

解决方式是开启 vm.overcommit_memory

1
# sysctl vm.overcommit_memory=1

Selinux 开启和关闭

如果 SELinux status 参数为 enabled 即为开启状态

1
2
3
/usr/sbin/sestatus -v

getenforce

临时关闭 SELinux

1
setenforce 0

修改 /etc/selinux/config,将 SELINUX=enforcing 改为 SELINUX=disabled,关闭 SELinux