Redis报错:MISCONF Redis is configured to save RDB snapshots, but it is currently not able to...
2023-09-14 09:08:34 时间
Outline
今天在启动celery时报错:
[2020-12-21 14:12:48,615: ERROR/MainProcess] consumer: Cannot connect to redis://127.0.0.1:6379/1: MISCONF Redis is│configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data │ set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (sto │p-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.. │Trying again in 18.00 seconds... (9/100)
问题定位
网上查阅后发现是因为,把redis快照强制关闭了导致不能持久化的问题
目前发现两种解决方案:
1、通过stop-writes-on-bgsave-error值设置为no即可避免这种问题。
2、通过修改redis.conf配置文件,将stop-writes-on-bgsave-error值改为no(效果和1一样)
解决
通过redis命令行直接改:
进入redis命令行执行:config set stop-writes-on-bgsave-error no
通过修改redis.conf文件修改:
保存退出
参考:https://blog.csdn.net/qq_22167989/article/details/103136300
相关文章
- Redis 简介、特性、版本说明
- C#Redis哈希Hashes
- 解决方法:配置群集时# gem install redis 报错:Unable to require openssl, install OpenSSL and rebuild ruby
- 利用redis的bitmap实现用户签到功能
- ehcache和redis的区别及适用场景
- thinkphp6: 用redis+lua做限流(php 8.1.1 / thinkphp v6.0.10LTS )
- 腾讯云环境配置之PHP5.6.3 + redis扩展 稳定版
- [转]Redis作者:深度剖析Redis持久化
- 〖Python 数据库开发实战 - Redis篇⑫〗- Redis的事务特性
- 在 windows 上安装 Redis
- Redis主体流程分析
- (求锤得锤的故事)Redis锁从面试连环炮聊到神仙打架。