一時的なconfig set stop-writes-on-bgsave-error noを恒久的な設定に変えたい
ec2のインスタンスを再起動してから、以下のエラーが出ていました。
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-cliから
config set stop-writes-on-bgsave-error no
を叩くと、すべてうまく行くようになりました。
ただこの方法はあくまでも一時的な方法というようにいくつかのサイトで書いてありました。
これを恒久的な設定に変えるには、どのようにすれば良いのでしょうか?お手数ですが、何かご教示いただけることがあれば何卒よろしくおねがいします。
環境
macOS High Sierra(バージョン10.13.6)
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin17]
Rails 4.2.6
redis (4.0.1)
redis (4.0.1)
redis-actionpack (5.0.2)
actionpack (>= 4.0, < 6)
redis-rack (>= 1, < 3)
redis-store (>= 1.1.0, < 2)
redis-activesupport (5.0.4)
activesupport (>= 3, < 6)
redis-store (>= 1.3, < 2)
redis-namespace (1.6.0)
redis (>= 3.0.4)
redis-rack (2.0.4)
rack (>= 1.5, < 3)
redis-store (>= 1.2, < 2)
redis-rails (5.0.2)
redis-actionpack (>= 5.0, < 6)
redis-activesupport (>= 5.0, < 6)
redis-store (>= 1.2, < 2)
redis-store (1.4.1)
redis (>= 2.2, < 5)
capistrano (3.10.1)
capistrano-sidekiq (1.0.0)
capistrano-upload-config (0.8.2)
/usr/local/redis-3.2.5/redis.conf
bind 127.0.0.1
protected-mode yes
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize no
supervised no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 16
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir ./
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
aof-rewrite-incremental-fsync yes
redis-cliでinfo
Memory
used_memory:764200
used_memory_human:746.29K
used_memory_rss:4902912
used_memory_rss_human:4.68M
used_memory_peak:2360784
used_memory_peak_human:2.25M
total_system_memory:4145164288
total_system_memory_human:3.86G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:6.42
mem_allocator:jemalloc-4.0.3
Persistence
loading:0
rdb_changes_since_last_save:618
rdb_bgsave_in_progress:0
rdb_last_save_time:1546658955
rdb_last_bgsave_status:err
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
CPU
used_cpu_sys:433.97
used_cpu_user:525.88
used_cpu_sys_children:0.00
used_cpu_user_children:0.00z