-
I use the example config file docker compose file. Everything seems to work fine. But I want to dig into how redis docker instance works. ~$ sudo docker logs unbound-db
1:C 13 Nov 2024 23:08:16.077 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
1:C 13 Nov 2024 23:08:16.082 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 13 Nov 2024 23:08:16.082 * Redis version=7.4.1, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 13 Nov 2024 23:08:16.082 * Configuration loaded
1:M 13 Nov 2024 23:08:16.082 * monotonic clock: POSIX clock_gettime
1:M 13 Nov 2024 23:08:16.084 * Running mode=standalone, port=0.
1:M 13 Nov 2024 23:08:16.085 * Server initialized
1:M 13 Nov 2024 23:08:16.085 * Ready to accept connections unix
1:M 13 Nov 2024 23:13:17.039 * 100 changes in 300 seconds. Saving...
1:M 13 Nov 2024 23:13:17.040 * Background saving started by pid 21
21:C 13 Nov 2024 23:13:17.059 * DB saved on disk
21:C 13 Nov 2024 23:13:17.060 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
1:M 13 Nov 2024 23:13:17.141 * Background saving terminated with success The unbound-db log looks fine. Then I try to find out where the redis store its persistent db file. So since we use docker volume cachedb.d, I looked up docker volume. root@odroidn2plus:/var/lib/docker/volumes/odroid_cachedb.d/_data# ls -al
total 8
drwxr-xr-x 2 systemd-coredump odroid 4096 Nov 13 23:08 .
drwx-----x 3 root root 4096 Oct 28 10:57 ..
srwxrwx--- 1 systemd-coredump odroid 0 Nov 13 23:08 redis.sock The redis.sock always shows 0. I then use `docker exec -ti unbound-db sh -c "redis-cli -s /usr/local/unbound/cachedb.d/redis.sock monitor" ‘ to monitor the redis instance. I can see data flows. I also try to comment out the db file save setting in https://raw.githubusercontent.com/madnuttah/unbound-docker/main/doc/examples/redis/redis.conf but no effect I can notice. I’d like to seek help. Whether this is normal redis behaviour that the db file won’t grow? How it keeps data post power cycle? Does the AOF need to enable as well? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello there! A UNIX Socket doesn't grow, it's a socket. Your I've converted this issue to a discussion as it's rather a question than a problem with the image. Cheers! |
Beta Was this translation helpful? Give feedback.
Hello there!
A UNIX Socket doesn't grow, it's a socket. Your
dump.rdb
file (as configured in yourredis.conf
) should contain some entries, though. All I see looks fine. :)I've converted this issue to a discussion as it's rather a question than a problem with the image.
Cheers!