MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk
来源:互联网 发布:2017网络赚钱新项目 编辑:程序博客网 时间:2024/04/29 11:19
环境:ubuntu14.04
redis报错:
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.
解决:
1,/etc/sysctl.conf中添加:
vm.overcommit_memory=1
2,ps aux|grep redis
找到redis-server服务,kill掉
3,启动redis-server:
sudo nohup redis-server /YOU_CONF_PATH/redis.conf &
这里/YOU_CONF_PATH/redis.conf表示redis配置文件的路径,没有特别配置不加;不需要root用户的不用加sudo
其他查询到的资料:
内核参数说明如下:
1, 表示内核允许分配所有的物理内存,而不管当前的内存状态如何。
2, 表示内核允许分配超过所有物理内存和交换空间总和的内存
错误原因:
简单地说:Redis在保存数据到硬盘时为了避免主进程假死,需要Fork一份主进程,然后在Fork进程内完成数据保存到硬盘的操作,如果主进程使用了4GB的内存,Fork子进程的时候需要额外的4GB,此时内存就不够了,Fork失败,进而数据保存硬盘也失败了。
注释:我top查看时,内存也是4G用了大概一半后报错的。
参考:
http://www.redicecn.com/html/Linux/20131125/468.html
http://blog.csdn.net/anghlq/article/details/7087069
http://www.linuxidc.com/Linux/2012-07/66079.htm
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Com
- 解决 MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Com
- MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk.
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- Redis ”MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- Redis报错 MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d
- 存取之美——HashMap原理与实践
- 每年WWDC的记录
- 位操作,置位,清零
- iOS获取系统时间
- 手机分辨率导致文字显示不完整的问题
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk
- OC------RunTimer
- php判断ip的地址是否合法
- Hibernate
- Redis 之数据结构
- 过滤器(filter)和拦截器(interceptor)区别
- 验证身份证是否合法
- Spark入门实战系列--8.Spark MLlib(上)--机器学习及SparkMLlib简介
- sizeThatFits 和 sizeToFit区别