7.3.58. shutdown# Summary#

shutdown stops the Groonga server process.

shutdown uses graceful shutdown by default. If there are some running commands, the Groonga server process stops after these running commands are finished. New command requests aren’t processed after shutdown command is executed.

New in version 6.0.1: shutdown uses immediate shutdown by specifying immediate to mode parameter. The Groonga server process stops immediately even when there are some running commands.


You need to set Request ID to all requests to use immediate shutdown.

New in version 9.1.2: The Groonga HTTP server accepts immediate shutdown immediately even when all threads are used.


This feature can only use on the Groonga HTTP server. Syntax#

This command takes only one optional parameter:

shutdown [mode=graceful] Usage#

shutdown use graceful shutdown by default:

Execution example:

# [[0,1337566253.89858,0.000355720520019531],true]

You can specify graceful to mode parameter explicitly:

Execution example:

shutdown --mode graceful
# [[0,1337566253.89858,0.000355720520019531],true]

You can choose immediate shutdown by specifying immediate to mode parameter:

Execution example:

shutdown --mode immediate
# [[0,1337566253.89858,0.000355720520019531],true]

Immediate shutdown is useful when you don’t have time for graceful shutdown. For example, Windows kills service that takes long time to stop on Windows shutdown. Parameters#

This section describes parameters of this command. Required parameters#

There is no required parameter. Optional parameters#

There are optional parameters. mode#

Specifies shutdown mode. Here are available shutdown modes:




Stops after running commands are finished.

This is the default.


New in version 6.0.1: Stops immediately even if there are some running commands. Return value#

shutdown returns true as body when shutdown is accepted:

[HEADER, true]

If shutdown doesn’t accept shutdown, error details are in HEADER.

See Output format for HEADER.