首先找到出现错误的原因:

redis.exceptions.ResponseError: 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.

  misconf redis被配置以保存数据库快照,但misconf redis目前不能在硬盘上持久化。用来修改数据集合的命令不能用,请使用日志的错误详细信息。

  强制把redis快照关闭了导致不能持久化的问题。运行info命令查看redis快照的状态,如下:

  Redis报错:redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snap

解决方案如下:

1. redis运行 config set stop-writes-on-bgsave-error no 命令

config set stop-writes-on-bgsave-error no 
2.修改redis.conf文件:vi打开redis-server配置的redis.conf文件,然后定位到stop-writes-on-bgsave-error字符串所在位置,接着把后面的yes设置为no即可。
stop-writes-on-bgsave-error no