Regards,
- Josiah
> --
> 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.
>
>
You can always do 'sudo kill -9 <redis pid>', and that will definitely
stop Redis, but it won't leave you with the most recent dump.
Regards,
- Josiah
If it's mostly reads, then you shouldn't have much of a problem with
the AOF (just enable rewriting on occasion to handle the growth of the
AOF over time).
I'm curious, how much translation data do you have for it to take
minutes to sync to disk? I've got about 25 gigs of misc data in one of
my instances, and it flushes to disk in 60-90 seconds.
- Josiah
> Hi Josiah
> Thanks for the reply. I'm on 2.2.6.
>
> If I try shutting down the system (not as root) then it just hangs with a message saying waiting for redis to shutdown(every second or so). The only thng that I can do is hold down the start button on the box.
>
Wait, so are you using redis-cli or kill? It sounds like you're using the included init script (or a variation of it), which uses redis-cli. kill is a separate command, and you'll have to change the script to use it.
-NK
Cheers,
Pieter
> Thanks Pieter, Nick, Joshua,
> Being just a developer, I'm not always clear about installing system things on my box.
>
> I have just a litle dev data in redis now (more or less experimenting in preparation for the development). I'll turn off the snapshot, but that doesn't seem to be the problem.
>
> I installed redis as root and now want to be able to exit the machine as me. This works fine for things like postgres. May be I need to do what postgres does and use redis with a dedicated redis user to start it. Then shutdown issued by me can stop it without a problem???
When you issue a shutdown command, you're starting a root-level process (magic that may vary in details between systems, but you can consider it a setuid binary, which it often is). The init scripts are run as root, no matter what user you issued "shutdown" as.
What you are experiencing is not a system permissions issue, but a problem with the way the init script is trying to shut down Redis.
Step by step:
* Your init script (probably in /etc/init.d/redis or something similar) probably does something like this on shutdown (from the default init script):
echo "Stopping ..."
$CLIEXEC -p $REDISPORT shutdown
while [ -x /proc/${PID} ]
do
echo "Waiting for Redis to shutdown ..."
sleep 1
done
echo "Redis stopped"
($CLIEXEC holding the path to redis-cli)
* This doesn't work if you set a password, because redis-cli can't connect to the server without the password.
* You have two options to make this work:
A) Change
$CLIEXEC -p $REDISPORT shutdown
to something like
$CLIEXEC -p $REDISPORT -a yourpassword shutdown
This gives redis-cli the password and it can now connect and issue the shutdown command.
Downside: Your password is now stored in an init script. This probably isn't a big deal, but it's not ideal, either, especially if you change it later, you have to remember to change it in the init script.
OR
B) Change
$CLIEXEC -p $REDISPORT shutdown
to something like
/bin/kill ${PID}
This bypasses Redis' built-in authentication by sending the process a TERM signal rather than connecting. Redis catches the TERM signal, saves, and shuts down.
Downside: If there's something wrong with your system, there's some chance of killing the wrong process, and thus also some chance of shutdown proceeding without Redis actually having received the TERM signal sent by kill, thus possible data loss.
-NK
-NK
On a similar question, we're storing 1,000,000 lists of about 1000
numbers each. A rough estimate of 64-bits per value, that would
calculate out to 8GB. Seems like a lot of overhead? Anybody know where
that overhead is coming from?
--
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+unsubscribe@googlegroups.com.