I want to change the temporary config set stop-writes-on-bgsave-error no to a permanent setting.

Asked 2 years ago, Updated 2 years ago, 94 views

After restarting the ec2 instance, the following error occurred:

MISCONF Redis is configured to save RDB snapshots, but is currently not possible to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.

We did a lot of things to resolve this, but we couldn't recover it in any way, so as a temporary measure
Redis-cli to

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

Everything went well when I hit .

However, this method was written on several sites as a temporary method.

How do I change this to a permanent setting?Sorry for the inconvenience, but if you have any questions, please let me know.

Environment
macOS High Sierra (version 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

bind127.0.0.1
protected-mode yes
port6379
tcp-backlog511
timeout0
tcp-keepalive300
daemonize no
supervisioned no
pidfile/var/run/redis_6379.pid
loglevel notice
logfile"
databases16
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-delay5
repl-disable-tcp-nodelay no
slave-priority 100
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage100
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-entries512
hash-max-ziplist-value64
list-max-ziplist-size-2
list-compress-depth0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value64
hll-sparse-max-bytes 3000
activatehashing yes
client-output-buffer-limit normal00
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
aof-rewrite-incremental-fsyncyes

info

in redis-cli

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

ruby-on-rails ruby rubygems redis

2022-09-30 21:38

1 Answers

First, I had to look up the current working directory for redis.
The PROC file system looked at the redis CWD and allowed UID501 to write permissions to this directory to work well.


2022-09-30 21:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.