redis连接错误System Error MISCONF Redis is configured to save RDB snapshots, but XX

 
情况1解决办法:
由于强制停止redis快照,不能持久化引起的。
在客户端输入
config set stop-writes-on-bgsave-error no

情况2解决办法:

Redis在保存数据到硬盘时为了避免主进程假死,需要Fork一份主进程,然后在Fork进程内完成数据保存到硬盘的操作,如果主进程使用了4GB的内存,Fork子进程的时候需要额外的4GB,此时内存就不够了,Fork失败,进而数据保存硬盘也失败了。

修改vm.overcommit_memory=1

// 原文:http://pydelion.com/2013/05/27/redis-cant-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.cnf: vm.overcommit_memory=1

情况3解决办法:

Permission denied持久化文件无权限,改一下文件夹权限就解决了

chmod  777 /xxx/redis_data

 

当然是那种情况需要先看看redis日志文件。

redis在默认情况下,是不会生成日志文件的,所以需要配置 配置方法:

1、首先找到redis的配置文件

2、打开配置文件,直接搜logfile ""

3、将路径填入logfile后面的引号内,例如:logfile "/plus/data/redis_data/redislog/redis.log"

4、手动建立了/plus/data/redis_data/redislog文件夹,日志文件不用建,重启redis会自动生成

redis连接错误3种解决方案System Error MISCONF Redis is configured to save RDB snapshots的更多相关文章

  1. 连接Redis后执行命令错误 MISCONF Redis is configured to save RDB snapshots

    今天在redis中执行setrange name 1 chun 命令时报了如下错误提示: (error) MISCONF Redis is configured to save RDB snapsho ...

  2. 解决redis连接错误:MISCONF Redis is configured to save RDB snapshots, but it is currently not able to...

    今天Redis服务器在连接redis数据库时突然报错:MISCONF Redis is configured to save RDB snapshots, but it is currently no ...

  3. laravel 项目表单中有csrf_token,但一直报错419错误 解决redis连接错误:MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persi

    laravel 项目表单中有csrf_token,但一直报错419错误,因为项目中使用到Redis缓存,在强制关闭Redis后出现的问题,查询laravel.log文件查找相关问题 安装redis后在 ...

  4. Redis错误解决:(error) MISCONF Redis is configured to save RDB snapshots

    刚开始学习使用redis数据库,在执行删除命令时,提示了我这么一个错误: 错误提示 (error) MISCONF Redis is configured to save RDB snapshots, ...

  5. redis出现MISCONF Redis is configured to save RDB snapshots...的错误

    今天重启服务器在连接redis数据库时突然报错: MISCONF Redis is configured to save RDB snapshots, but it is currently not ...

  6. (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk

    今天运行Redis时发生错误,错误信息如下: (error) MISCONF Redis is configured to save RDB snapshots, but is currently n ...

  7. redis error MISCONF Redis is configured to save RDB snapshots

    在操作命令incr时发生错误: (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able ...

  8. 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报错了,重启了一下好了,一会又报错了. 错误信息: MISCONF Redis is configured to save RDB snapshots, but ...

  9. (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d

    出现redis错误: (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to p ...

随机推荐

  1. WPF中的Generic.xaml, theme以及custom control

    原文:WPF中的Generic.xaml, theme以及custom control 在Visual Studio中创建自定义控件时,所有控件都将添加到/Themes/Generic.xaml. 最 ...

  2. Vue插件资料

    UI组件element ★11612 - 饿了么出品的Vue2的web UI工具套件 Vux ★7503 - 基于Vue和WeUI的组件库 iview ★5801 - 基于 Vuejs 的开源 UI ...

  3. android模拟器上不了网的解决办法

    Android模拟器默认的地址是10.0.2.3,默认的DNS也是10.0.2.3,对于在家里上网学习Android的人来讲,一般电脑的IP都是192.168.1.100之类的,不在同一个网段.所以就 ...

  4. Math对象重新整理

    注意:Math 对象是一个固有的对象,无需创建它,直接把 Math 作为对象使用就可以调用其所有属性和方法.这是它与Date,String对象的区别. Math对象的属性 --Math对象包含的属性大 ...

  5. Object-c学习笔记(1)

    说明:本人用的win8 系统装Code::Blocks练习OC. 1.类的声明和实现的关系图:  @interface就好像暴露在外面的时钟表面  @implementation就好像隐藏在时钟内部的 ...

  6. Android中的事件处理研究

    处理用户界面事件Handling UI Events 在Android上,不止一个途径来侦听用户和应用程序之间交互的事件.对于用户界面里的事件,侦听方法就是从与用户交互的特定视图对象截获这些事件.视图 ...

  7. redis支持哪些数据类型

    虽然redis的key和value之支持string和byte[],但是仍可以以string的形式保存其他格式,甚至是图片. 1)String: 用set(key,value),get(key) 2) ...

  8. JS中常用函数总结

    //LTrim(string):去除左边的空格 function LTrim(str) { var whitespace = new String(" \t\n\r"); var ...

  9. 一些自成系统、完备的教程(链接、博客、github等)

    0. Linus shell Advanced Bash-Scripting Guide 1. latex Some applicable LATEX's info 14 课的个人 CV 制作: 15 ...

  10. spring boot 集成mybatis报错Missing artifact

    1. pom文件中的oracle依赖提示Missing artifact,需要手动下载并导入maven参考 oracle依赖下载地址 (ojdbc6.jar) cd到下载的ojdbc6.jar所在路径 ...