Redis 오류 (MISCONF Redis is configured to save RDB snapshots~~~) 에러 발생


Redis 오류 (MISCONF Redis is configured to save RDB snapshots~~~) 에러 발생

Redis는 특정시점에 데이터를 디스크로 저장하여 파일로 보관이 가능.
이러한 기능으로 장애발생시 복구가능하고 파일로 저장하는경우 RDB 파일로 저장한다.

Redis 에서는 RDB 파일 저장 실패  Redis의 데이터 쓰기가 모두 불가능하게 되고 Redis를 이용하고 있는 서비스들은 심각한 장애가 발생

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.

위와 같은 메세지가 출력된다!!

Redis의 기본설정시 "stop-writes-on-bgsave-error yes" 있으므로 RDB 저장 실패시 Redis의 데이터 쓰기가 불가능하게 되며, 
해결방법은 redis-cli에서 또는 redis.conf 파일에서 설정하는 방법이 있다.


1. Redis RDB 저장 실패시 데이터 쓰기 설정 - redis-cli

config set stop-writes-on-bgsave-error를 no로 설정한다.

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

2. Redis RDB 저장 실패시 데이터 쓰기 설정 - redis.conf

# vi /etc/redis/redis.conf
stop-writes-on-bgsave-error no