Redis instantly saving to disk even though configured not to - redis

I'm using redis 2.8 with the default redis.conf file.
save 900 1
save 300 10
save 60 10000
appendonly no
I tried setting a key and immediately restarted the server (within few seconds). Upon restarting the key is persisting.
I don't understand how that's happening. According to the default configuration the key should be saved to disk only if 10000 keys are changed within 60 seconds.
Even tried to set
appendfsync no
Still the key is persisting.

When the save configuration directive is set (to any value), Redis will persist the dataset to RDB before shutting down. This behavior can be overridden by calling the SHUTDOWN command with the optional NOSAVE subcommand.

Related

Redis taking RDB dump even if save is disabled

I have configured my redis cluster with the following config:
appendonly no
save ""
But I found out that my redis is taking a back up and has taken a backup recently. My use case doesn't require any rdb save to be done. Am I missing some thing?
For disable all backups in redis go to redis.conf file do the following:
Comment all save directives, by default there are three of them.
save 900 1
save 300 10
save 60 10000
Disable appendonly (set appendonly to no)

Redis load from aof and continue only in-memory

I configured a Redis instance to operate only in memory (no data are dumped to a persistent storage) by commenting out the save commands:
################################ SNAPSHOTTING ################################
# save 900 1
# save 300 10
# save 60 10000
Now when I start my instance, Redis checks if there is any data the file dump.rdb. If yes, then it loads the data and the execution continues only in-memory.
Is there a way for me to load previous data from appendonly.aof (append only mode) and then continue only in an "in-memory only mode"?
No - AOF loading upon startup (unlike RDB) is done if and only if appendonly is not set to no. What you could do, as a workaround, is set appendonly to yes in the redis.conf file and once the server is up and running issue a CONFIG SET appendonly no to turn it off.

Redis server deleted after rebooting the machine

I am working with redis 3.0.7 on Ubuntu. Everytime im doing reboot and then starting redis server using "nohup redis-server &" all the keys-values content is deleted.
I checked the snapshotting and in redis.conf and i have the default configuration of:
save 900 1
save 300 10
save 60 10000
The machine was up for a long time (months) before the first reboot.
Any idea why this could be happenning?
Ok apperantly i have to start the server from where the dump file actually is. found it, works now.

How to disable Redis RDB and AOF?

How to completely disable RDB and AOF?
I don't care about Persistence and want it to be in mem only.
I have already commented out the:
#save 900 1
#save 300 10
#save 60 10000
But this did not help and I see that Redis still tries to write to disk.
I know that Redis wants to write to disk because I get this error: "Failed opening .rdb for saving: Permission denied"
I don't care about the error, because I want to disable the Persistence altogether.
If you want to change the redis that is running, log into the redis, and
disable the aof:
config set appendonly no
disable the rdb:
config set save ""
If you want to make these changes effective after restarting redis, using
config rewrite
to make these changes to redis conf file.
If your redis have not started, just make some changes to redis.conf,
appendonly no
save ""
make sure there are no sentences like "save 60 1000" after the upper sentences, since the latter would rewrite the former.
Update: please look at Fibonacci's answer. Mine is wrong, although it was accepted.
Commenting the "dbfilename" line in redis.conf should do the trick.

Redis crashes instantly without error

I've got redis installed on my VM, and I haven't used it in a while. (Last I was using it, it did work, and now it doesn't.. nothing's changed in that time (about a month)). Needless to say I'm deeply confused but I'll post as much info as I can.
$ redis-server
Server starts, but throws a warning about overcommit memory being set to 0. I'm on a VM, so I can't change this setting from 0 to 1 if I wanted, which I wouldn't want to anyway for my purposes. I've written a custom redis.config file though, which I want it to use (and which I was using in the past), so starting it with the default config file doesn't do me much good. Let's try this again.
$ redis-server redis.config
$
Nothing. Silence. No error message, just didn't start.
$ nohup redis-server redis.config > nohup.out&
I get a process ID, but then $ ps and I see the the process is listed as stop and shortly disappears. Again, no errors, and no output in nohup.out nor in the log file for redis. Below is the redis.config I'm using (without the comments to keep it short)
daemonize yes
pidfile [my-user-account-path]/redis/redis.pid
port 0
bind 127.0.0.1
unixsocket [my-user-account-path]/tmp/redis.sock
unixsocketperm 770
timeout 10
tcp-keepalive 60
loglevel warning
logfile [my-user-account-path]/redis/logs/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error no
rdbcompression no
rdbchecksum no
dbfilename dump.rdb
dir [my-user-account-path]/redis/db
slave-serve-stale-data yes
slave-priority 100
appendonly no
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
# ADVANCED CONFIG is set to all default settings#
I'm sure it's probably something stupid, probably even a permissions thing somewhere (I've tried executing this as root, fyi), to no avail. Anyone ever experience something similar with Redis?
i have been experiencing redis crashes as well. just an fyi - the guy responsible for much of redis' development, Salvatore Sanfilippo, aka antirez, keeps an interesting blog that has some insight on redis crashes:
http://antirez.com/news/43