Signals
Command Line
nats-server command
Unix Signal
Description
Usage
nats-server --signal <command>nats-server --signal ldmMultiple processes
Windows
Last updated
Was this helpful?
On Unix systems, the NATS server responds to the following signals.
You can send these using the standard Unix kill command, or use the nats-server --signal command for convenience.
--signal quit
SIGINT
Stops the server gracefully
--signal term
SIGTERM
Stops the server gracefully
--signal stop
SIGKILL
Kills the process immediately
--signal reload
SIGHUP
Reloads server configuration file
--signal reopen
SIGUSR1
Reopens the log file for log rotation
To send a signal to a running nats-server:
nats-server --signal <command>For example, to gracefully stop the server with lame duck mode:
nats-server --signal ldmIf there are multiple nats-server processes running, or if pgrep isn't available, you must either specify a PID or the absolute path to a PID file:
As of NATS v2.10.0, a glob expression can be used to match one or more process IDs, such as:
See the Windows Service section for information on signaling the NATS server on Windows.
Last updated
Was this helpful?
Was this helpful?
nats-server --signal stop=<pid>nats-server --signal stop=/path/to/pidfilenats-server --signal ldm=12*