首页 > 代码库 > redis问题接囧办法及经验
redis问题接囧办法及经验
1、问题MISCONF Redis is configured to save RDB snapshots
127.0.0.1:6379> set k1 "nob"
(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
出现如上错误是因为磁盘无法写入,缘由:应该是之前强制停止redis快照导致
我的解囧,重启机器没问题了,哈哈哈,就是因为几次强制停止造成的
有人的解囧如下
config set stop-writes-on-bgsave-error no
如果是内存问题应该如下办法,具体查看日志,
请在/etc/sysctl.conf 添加一项 ‘vm.overcommit_memory = 1‘ ,然后重启(或者运行命令‘sysctl vm.overcommit_memory=1‘ )使其生效。
[参考文献]
1、http://www.linuxidc.com/Linux/2012-07/66079.htm 从Redis的数据丢失说起
2、http://www.redicecn.com/html/Linux/20131125/468.html MISCONF Redis is configured to save RDB 内存问题引起
3、http://blog.csdn.net/chenggong2dm/article/details/17325241 磁盘满了也报错 MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk
redis问题接囧办法及经验