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. android 内存优化 性能优化

    最近做一个android 的应用程序 总是出现内存高 和cpu高的问题困扰了好多天. 下面为自己从网上总结的和自己找到的问题. 1. WebView  控件: 使用了 WebView 控件一定要注意清 ...

  2. Method and apparatus for training a memory signal via an error signal of a memory

    Described herein is a method and an apparatus for training a memory signal via an error signal of a ...

  3. SqlBulkCopy快速插入datatable到数据库中参考代码,以及要注意的问题

    参考代码如下: public class Examination { #region 批量插入一个sheet的专业对应的学科 /// <summary> /// 批量插入一个sheet的专 ...

  4. AvalonDock的基本用法

    原文:AvalonDock的基本用法         AvalonDock是优秀的开源项目,用于创建可停靠式布局,能够在WPF中方便开发出类似VS2010的软件界面.对于复杂的软件系统,大量控件的使用 ...

  5. Python 函数调用性能记录

    之前用 JS 写项目的时候,项目组用的组件模式,一直感觉很不错.最近用 Python 做新项目,项目结构也延续了组件模式.一直没有对函数调用的性能作了解,今天突发奇想测试了一下,写了一些测试代码 首先 ...

  6. Cocos2d-x 3.1 一步一步地做改编

    本文并不想谈论的屏幕改编或真理的概念.假设不知道cocos2d-x的,请先看这篇文章:http://www.cocoachina.com/gamedev/cocos/2014/0516/8451.ht ...

  7. Qt5官方demo分析集10——Qt Quick Particles Examples - Emitters

    此系列的所有文章都可以在这里查看http://blog.csdn.net/cloud_castle/article/category/2123873 前段时间去听了Qt在北京的开发人员大会,感觉QML ...

  8. UVA - 825Walking on the Safe Side(dp)

    id=19217">称号: UVA - 825Walking on the Safe Side(dp) 题目大意:给出一个n * m的矩阵.起点是1 * 1,终点是n * m.这个矩阵 ...

  9. 模拟请求(模拟header gzip解压 泛型)

    WebClient HeaderData是自定义类对象,存储header信息 private static T GetDataCommonMethod<T>(string url, str ...

  10. C#读取文件夹特定文件的方法

    public image[] getImages() { FolderBrowserDialog fbd = new FolderBrowserDialog(); if (fbd.ShowDialog ...