Latest web development tutorials

Redis Shutdown command

Redis server

Redis Shutdown command performs the following actions:

  • Stop all clients
  • If you have saved at least one point in waiting, execute SAVE command
  • If AOF option is opened, AOF file update
  • Close redis server (server)

grammar

redis Shutdown command basic syntax is as follows:

redis 127.0.0.1:6379> SHUTDOWN [NOSAVE] [SAVE] 

Available versions

> = 1.0.0

return value

Error is returned when execution failed. Does not return any information is successful, the server and the client is disconnected, the client automatically exit.

Examples

redis 127.0.0.1:6379> PING
PONG

redis 127.0.0.1:6379> SHUTDOWN

$

$ redis
Could not connect to Redis at: Connection refused
not connected>

Redis server