redis写入时发生(error) MISCONF Redis is configured to save RDB snapshots

在redis写入时提示异常:
(error) 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 (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

  1. 我们可以通过修改redis.conf文件来修改这个问题
    通过:/stop-writes-on-bgsave-error 快速定位
    yes:是在写入时候快照出错会提示rdb错误
    no:取消error
    将配置改为no即可
    在这里插入图片描述

  2. 当然也可以通过连接客户端输入命令,但是重启完后就会失效,所以想一劳永逸的话还是需要去修改我们的redis.conf文件哦。

	127.0.0.1:6379> config set stop-writes-on-bgsave-error no

注:修改完配置文件记得重启,客户端输入重启redis后失效,一劳永逸是需要修改配置文件的~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值