SHUTDOWN
Syntax
SHUTDOWN [SAVE | NOSAVE | SAFE] [NOW] [FORCE] [ABORT]
Time complexity: O(1)
ACL categories: @admin, @slow, @dangerous
Options
The SHUTDOWN
command supports optional modifiers to alter the behavior of the command:
SAVE
will force a DB saving operation even if no save points are configured.NOSAVE
will prevent a DB saving operation even if one or more save points are configured.SAFE
is accepted for Valkey compatibility and is treated the same asSAVE
.NOW
performs a fast shutdown. Dragonfly will attempt to accelerate shutdown and may close client connections sooner.FORCE
performs a fast shutdown and ensures no snapshot is created during shutdown. This overridesSAVE
/SAFE
and is equivalent to combining fast shutdown with a no-save behavior.ABORT
is not supported in Dragonfly. SupplyingABORT
returns an error, and the server remains running.
Notes
SAVE
andNOSAVE
are mutually exclusive. Supplying both results in a syntax error.FORCE
takes precedence overSAVE
/SAFE
andNOSAVE
regarding snapshot behavior.
Signal Handling
- If Dragonfly receives one of the signals
SIGTERM
andSIGINT
, the sameSHUTDOWN
sequence is performed. - See also Signal Handling.
Return
- On successful shutdown, nothing is returned since the server quits and the connection is closed.
- If
ABORT
is specified, Dragonfly returns an error:SHUTDOWN ABORT is not supported
, and the server remains running. - On other failures (e.g., invalid option combinations), an error is returned.