windows下解决Connection Exception: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.错误

wordpress在服务器安装redis扩展后,在后台启用“Redis Object Cache”插件时报以下错误:

Connection Exception: 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. (RedisException)

连接异常:misconf redis配置为保存RDB快照,但当前无法在磁盘上持久。可以修改数据集的命令被禁用。请查看redis日志以了解有关错误的详细信息。

经查是因为强制把redis快照关闭了导致不能持久化的问题,通过修改redis的配置文件将stop-writes-on-bgsave-error值设置为no即可避免这种问题。

打开redis安装目录redis.windows.conf

找到stop-writes-on-bgsave-error yes

改为stop-writes-on-bgsave-error no

重启redis

net stop redis

net start redis

恢复正常

redis-object-cache

linux下修改

有两种修改方法,一种是通过redis命令行修改,另一种是直接修改redis.conf配置文件

命令行修改方式示例:

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

修改redis.conf文件:打开redis-server配置的redis.conf文件,将stop-writes-on-bgsave-error后面的yes设置为no即可。

未经允许不得转载:蝈蝈部落格 » windows下解决Connection Exception: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.错误
分享到: 生成海报

评论 抢沙发

  • QQ号
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

登录

忘记密码 ?

您也可以使用第三方帐号快捷登录