Can you show the config you are using?
So in short, there are two issues:
a) Redis dies when looking at large data sets with redis-cli
b) Data that should be saved isn't saved
From your email I'm not sure if a) is an issue or not, but I wanted to
put it out here to see if this is something we could resolve. As for
b) (which I believe is your "main" issue), could you post a snippet of
the log file of about 15 minutes, so we can see if there are any
anomalies in the interval where Redis should spawn a child to save the
dump.
Didier already hinted to this, but are you sure this is not a
filesystem issue? E.g. when you backup the rdb you change its
permissions/owner which in turn causes Redis not being able to
atomically switch the temporary dump file to the target name.
Would love to hear some more details along this line so we can resolve this.
Thanks,
Pieter
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>
as Pieter suggested this are actually two different issues, possibly
due to the same reason, but let's analyze the two things separately.
Let's start with a few questions that will provide some more data:
INFO output while the instance is running normally. So that we can
know the exact Redis version, the dataset size and in general the
state of the instance.
Now on the two issuses.
1) Crash. You run with VM disabled. It is believed that at least in
2.0 there is some obscure bug related to replication and VM
interacting in some bad way. We believe that the issue is probably NOT
present in 2.2.
But as you run without VM enabled, we are not aware of any stability
problem at all in Redis 2.0 and 2.2.
When Redis crashes it is able to report the problem and even prints
the stack trace on the Log file.
Can you find it? Otherwise, it is possible that your Redis instance
was killed by the Linux OOM killer? You can see this in the kernel
log. So we definitely need more help about this from you, as the
current information is very little.
It is also possible to run Redis with gdb without any performance
penalty so that on crash there the possibility to ask gdb for a stack
trace and do some debugging but let's take this for the future. For
now the log of the Linux Kernel and Redis should provide enough info.
2) The problem with persistence.
Redis is a very simple system, if you understand how it works it will
be simple to understand what's wrong with it. So how persistence
works?
- Redis forks.
- The child starts saving the dataset as a temporary file name.
- When the new file is ready, it is renamed as dump.rdb, atomically,
using the rename(2) system call.
So basically if you run "ls -l dump.rdb" before and after Redis saves
on disk you can clearly that the creation date of the file changed.
Example:
$ ls -l dump.rdb
-rw-r--r-- 1 antirez staff 99313 11 Feb 15:11 dump.rdb
$ ls -l dump.rdb
-rw-r--r-- 1 antirez staff 99313 13 Feb 16:17 dump.rdb
$
If it does not change after a "BGSAVE" command, then there is
something wrong. But if there is something wrong you can see it from
the log file.
So if while you are doing a tail -f /path/to/redis_log_file
You also issue redis-cli BGSAVE
You should see "live" what happens.
Another reason why the persistence is not working is that, for some
reason, the parent process is trying to save but for some reason it
stopped working but it is still alive. So since the previous BGSAVE
never ended, the new can't start. I've not idea why this could happen
usually with sane hardware and local disks (so no NFS or alike), but
well to figure if this is the problem is trivial. One can just ask
INFO and check if the background save is in progress.
Also with ps it is possible to check the pid of the background saving
process and run an "strace -p <pid>" against it, to check what it is
doing, and why it is blocked.
Finally, are you running Redis natively or via some tool like "runit"
or other tools related to logging or restarting Redis automatically?
Ok I think this should be enough to start investigating.
Cheers,
Salvatore
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>
--
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele