benluteijn / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Redis doesn't save on SIGTERM #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Redis should save the database when receiving SIGTERM, as it is common to
terminate applications that way using init scripts and the kill command. I
could not find a good way to save and shutdown Redis in my init script.

Original issue reported on code.google.com by thomas...@gmail.com on 20 Dec 2009 at 7:50

GoogleCodeExporter commented 9 years ago
Not a solution to the SIGTERM issue, but here is a simplified version (removed
special things and distribution-specific parts) of the init script we use here.

Original comment by kata...@gmail.com on 21 Dec 2009 at 4:06

Attachments:

GoogleCodeExporter commented 9 years ago
Also if you distribute redis-cli with your package, you can use the following to
shutdown:

"redis-cli shutdown"

Original comment by kata...@gmail.com on 21 Dec 2009 at 4:08

GoogleCodeExporter commented 9 years ago
Thanks. As a note, "redis-cli shutdown" doesn't integrate well with my init 
script -
I tried something like this:

      if $CLI -p $PORT shutdown ; then
        success
      else
        fail
      fi

which resulted in a fail because redis-cli seems to return 1 on shutdown:

s11:~$ ./redis/redis-cli -p 62017 shutdown
s11:~$ echo $?
1

(maybe this is worth another bugreport?)

Anyway, still waiting for a proper shutdown with SIGTERM :-)

Original comment by thomas...@gmail.com on 21 Dec 2009 at 9:39

GoogleCodeExporter commented 9 years ago
http://github.com/astro/redis/commits/issue_128

Original comment by Str...@googlemail.com on 18 Apr 2010 at 1:48

GoogleCodeExporter commented 9 years ago
fixed in Redis master

Original comment by anti...@gmail.com on 23 Aug 2010 at 4:46