Stop redis server. Neither shutdown nor stop works

I finally got it down.

Get the PID of the process (this worked in Webfaction):

ps -u my_account -o pid,rss,command | grep redis

Then

> kill -9 the_pid

I was able to REPRODUCE this issue:

Start redis-server
Then break it using Pause/Break key

Now it hangs and it won't shutdown normally. Also the Python program trying to set/get a key hangs. To avoid this: Just close the window after starting redis-server. It's now running normally.


I can't reproduce the problem anymore, but shutdown NOSAVE helped me, when I was playing with redis and couldn't get it to shut down:

redis-cli
127.0.0.1:6379> shutdown
(error) ERR Errors trying to SHUTDOWN. Check logs.
127.0.0.1:6379> shutdown NOSAVE
not connected>

Shutdown Redis Server $ redis-cli -a password -p 6379 shutdown

Start Redis Server $ sudo service redis_6379 start

It works on Ubuntu Server 14.04 x86 Redis v2.8.15.

Tags:

Redis