PS:之前写过一遍,那个方法没有彻底解决,现找到真正的解决方法

环境:redis 3.2.100 windows版(注意!!!这是关键),win10,redis客户端spring boot 2.0.7,以及配对的spring data redis

某功能会频繁地大批量地往redis写入数据,数据量大概10秒内超过10000条

插入时可能会报错,报错时间点不定,大概都是运行一段时间后报错,错误信息如下:

nested exception is io.lettuce.core.RedisCommandExecutionException: 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的log找到如下报错:

=== REDIS BUG REPORT START: Cut & paste starting from here ===
Redis version: 3.2.100
[18808] 15 Mar 11:12:49.805 # --- EXCEPTION_ACCESS_VIOLATION
[18808] 15 Mar 11:12:49.805 # --- STACK TRACE
redis-server.exe!LogStackTrace(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:95)(0x0014E250, 0x0014FF90, 0x00000000, 0x4013A7F8)
redis-server.exe!UnhandledExceptiontHandler(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0x00000000, 0x00000000, 0x38D470E0)
KERNELBASE.dll!UnhandledExceptionFilter(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x401555B4, 0x38E3C15C, 0x00000000, 0x00000000)
ntdll.dll!memset(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x0014EEB0, 0x00000000, 0x40140E48, 0x0014EEB0)
ntdll.dll!_C_specific_handler(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0x0014E3C0, 0x0014E9C0, 0x00000000)
ntdll.dll!_chkstk(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x0014E3C0, 0x0014E9C0, 0x3623AB10, 0x00000000)
ntdll.dll!RtlWalkFrameChain(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x00000000, 0x511B7D55, 0x0014F220, 0x6506FC19)
ntdll.dll!KiUserExceptionDispatcher(c:\release\redis\src\win32_interop\win32_stacktrace.cpp:185)(0x40094F01, 0x0014F1F0, 0x400BFA57, 0x0014F2E0)
redis-server.exe!dictSdsHash(c:\release\redis\src\server.c:496)(0x0014F1F0, 0x400BFA57, 0x0014F2E0, 0x00000001)
redis-server.exe!dictFind(c:\release\redis\src\dict.c:517)(0x0014F220, 0x00000001, 0x0000002B, 0x00000001)
redis-server.exe!getExpire(c:\release\redis\src\db.c:871)(0x00000001, 0x0014F2E0, 0x0014F2E0, 0x03C07040)
redis-server.exe!rdbSaveRio(c:\release\redis\src\rdb.c:814)(0x40167210, 0x00DD0000, 0x00000005, 0x011D2754)
redis-server.exe!rdbSave(c:\release\redis\src\rdb.c:884)(0x00DD0000, 0x00DD0000, 0x5C8B2352, 0x00000005)
redis-server.exe!QForkChildInit(c:\release\redis\src\win32_interop\win32_qfork.cpp:337)(0x00000005, 0x00000000, 0x004BEF40, 0x00000005)
redis-server.exe!QForkStartup(c:\release\redis\src\win32_interop\win32_qfork.cpp:515)(0x00000006, 0x00000000, 0x00000000, 0x004A5550)
redis-server.exe!main(c:\release\redis\src\win32_interop\win32_qfork.cpp:1240)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
redis-server.exe!__tmainCRTStartup(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
KERNEL32.DLL!BaseThreadInitThunk(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
ntdll.dll!RtlUserThreadStart(f:\dd\vctools\crt\crtw32\startup\crt0.c:255)(0x00000000, 0x00000000, 0x00000000, 0x00000000)
[18808] 15 Mar 11:12:50.398 # --- INFO OUTPUT
[5660] 15 Mar 11:12:55.080 # fork operation failed
[5660] 15 Mar 11:12:55.226 # Background saving terminated by signal 1
[5660] 15 Mar 11:12:55.353 * 10000 changes in 60 seconds. Saving...

网上能找到很多解决方法(具体执行baidu),一种主流的方法是redis配置stop-writes-on-bgsave-error设为false,但这种方法只是让出错不停止,错误还是存在的,所以不想用这种方法

另外原因大概也清楚:就是redis写入数据会先写到内存,然后每隔一段时间会把内存数据写入rdb(一个文件数据库),以实现不会因为关机内存数据丢失就没了数据。问题是在写入rdb时出错

但不知道写入rdb出错原因在哪,网上很多说是内存不够,我看了内存占用也很低,只用了200+m

此问题直接原因应该是写入rdb时出错,但根本原因在于redis本身有bug

redis只有linux版,而windows版是微软自己做的,而且也停止更新,大概因此有bug也是正常吧

解决方法是redis(服务端)使用3.0.504,此版本已解决此bug

redis 大批量数据插入导致MISCONF Redis is configured to save RDB snapshots的解决的更多相关文章

  1. 读取redis中的数据时出现:MISCONF Redis is configured to save RDB snapshots

    读取redis中的数据时出现:MISCONF Redis is configured to save RDB snapshots   以下为异常详细信息: Exception in thread &q ...

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

  3. Redis问题MISCONF Redis is configured to save RDB snapshots....

    Redis问题MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di ...

  4. 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 ...

  5. Redis常见报错之 Redis::CommandError (MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk)

    在Redis运行过程中,报错信息如下: Redis::CommandError (MISCONF Redis is configured to save RDB snapshots, but it i ...

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

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

  7. redis 不能持久化问题 MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.

    转载自:http://www.cnblogs.com/anny-1980/p/4582674.html kombu.exceptions.OperationalError: MISCONF Redis ...

  8. Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk"问题的解决

    异常详细信息 Exception in thread "main" redis.clients.jedis.exceptions.JedisDataException: MISCO ...

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

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

随机推荐

  1. POJ2481(树状数组:统计数字 出现个数)

    Cows Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 15405   Accepted: 5133 Description ...

  2. linux 遍历目录+文件(优化版本)

    c++17 filesystem, regex 遍历目录 #include <stdio.h> #include <sys/types.h> #include <dire ...

  3. Maven项目实战(1)

    一.maven的好处? 同样的项目使用maven工程来实现,它的项目源码很小: 1.依赖管理 就是对jar 包管理的过程 2.项目的一键构建 (编译-----测试----- 运行 --打包------ ...

  4. Sharding & IDs at Instagram, Flickr ID generation

    Instagram: http://instagram-engineering.tumblr.com/post/10853187575/sharding-ids-at-instagram Flickr ...

  5. jsonp的使用方法

    参数jsonp 和 jsonpCallback jsonp指定使用哪个名字将回调函数传给服务端,也就是在服务端通过 request.getParameter(""); 的那个名字, ...

  6. codevs1074 食物链

    1074 食物链 2001年NOI全国竞赛  时间限制: 3 s  空间限制: 64000 KB  题目等级 : 钻石 Diamond 题解    

  7. [Xcode 实际操作]六、媒体与动画-(14)使用SystemSoundId播放简短声音

    目录:[Swift]Xcode实际操作 本文将演示如何播放音频素材. 在项目名称上点击鼠标右键,弹出右键菜单, 选择[Add Files to "DemoApp"],往项目中导入文 ...

  8. 6.Python初窥门径(小数据池,集合,深浅拷贝)

    Python(小数据池,集合,深浅拷贝) 一.小数据池 什么是小数据池 小数据池就是python中一种提高效率的方式,固定数据类型,使用同一个内存地址 小数据池 is和==的区别 == 判断等号俩边的 ...

  9. BZOJ 1069: [SCOI2007]最大土地面积(旋转卡壳)

    题目链接~ 1069: [SCOI2007]最大土地面积 思路很简单,极角排序求完凸包后,在凸包上枚举对角线,然后两边分别来两个点旋转卡壳一下,搞定! 不过计算几何的题目就是这样,程序中间的处理还是比 ...

  10. IOS 转场动画二和透明控制器视图

    一.透明视图控制器 WJListMenuViewController *VC = [[WJListMenuViewController alloc]init]; VC.modalPresentatio ...