리그캣의 개발놀이터

[redis] Error ReplyError: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB s.. 본문

프로그래밍 기본/서버 구축 및 관리

[redis] Error ReplyError: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB s..

리그캣 2020. 4. 13. 19:28

redis 서버 운용시 아래와 같은 에러가 발생하였다.

 

Error ReplyError: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

 

나는 redis를 docker로 작동하고 있엇기에 

 

docker를 통해 redis-cli를 실행하고 다음을 입력했다

 

도커 레디스 접근

$docker exec -it {레디스 컨테이너} redis-cli

 

세팅

> config set stop-writes-on-bgsave-error no

그후 redis에 저장해보니 해당 오류가 나지않았다.

해결하는 것도 중요하지만 먼저 왜 해당 오류가 발생했는지 알아야된다고 생각한다.

rdb 스냅샷을 지정되게끔 해놓았지만, 리소스가 저장할 디스크 크기가 적당하지 않은것같다.

 

127.0.0.1:6379> CONFIG SET dir /data/tmp
OK
127.0.0.1:6379> CONFIG SET dbfilename temp.rdb
OK
127.0.0.1:6379> BGSAVE
Background saving started
127.0.0.1:6379>

위와 같이 /data/tmp를 지정하고 이때 /data/tmp의 크기가 적당한지 먼저 체크해야한다.

 

자세한 내용은 아래를 참고한다.

https://gist.github.com/kapkaev/4619127

Comments