Stop redis server. Neither shutdown nor stop works

后端 未结 16 772
深忆病人
深忆病人 2021-01-31 08:43

I want to stop the redis server and it just keeps going and going. I am using redis-2.6.7

Check that it is running:

redis-server

It say

16条回答
  •  [愿得一人]
    2021-01-31 08:52

    This is possibly an really important note for some people reading this. If your redis doesn't seem to be responding to a shutdown. CHECK THE LOGS.

    They may say something like this:

    Apr 24 00:48:54 redis[828]: Received SIGTERM, scheduling shutdown...
    Apr 24 00:48:54 redis[828]: User requested shutdown, saving DB...
    Apr 24 00:55:37 redis[828]: DB saved on disk
    

    Maybe your DB is multiple GB, or tens of GBs in which case it will take time to shutdown. If instead you want to clean out all keys, there is a better way to do that than shutdown. FLUSHALL

提交回复
热议问题