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

redis

redis

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

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即可。

 

 

原文链接:https://www.pengjy.com/269.html,转载请注明出处。
0

评论0

没有账号?注册  忘记密码?