mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
add signals doc
add a brief description of the signals handled by Gunicorn. fix #319
This commit is contained in:
parent
d29febdb28
commit
e5242d4fde
@ -41,6 +41,7 @@ Contents
|
||||
configure
|
||||
deploy
|
||||
design
|
||||
signals
|
||||
community
|
||||
faq
|
||||
news
|
||||
|
||||
40
docs/source/signals.txt
Normal file
40
docs/source/signals.txt
Normal file
@ -0,0 +1,40 @@
|
||||
.. _signals:
|
||||
|
||||
================
|
||||
Signals Handling
|
||||
================
|
||||
|
||||
A brief description of the signals handled by Gunicorn, We also document the
|
||||
signales used internally by Gunicorn to communicate with the workers. With the
|
||||
exception of TTIN/TTOU the signals handling match the behaviour of `nginx
|
||||
<http://wiki.nginx.org/CommandLine>`.
|
||||
|
||||
Master process
|
||||
==============
|
||||
|
||||
- **TERM**, **INT**: Quick shutdown
|
||||
- **QUIT**: Graceful shutdwn. I waits for workers to finish their
|
||||
current request before finishing until the *graceful timeout*.
|
||||
- **HUP**: Reload the configuration, start the new worker processes with a new
|
||||
configuration and gracefully shutdown older workers. If the application is
|
||||
not preloaded (using the ``--preload`` option), Gunicorn will also load the
|
||||
new version.
|
||||
- **TTIN**: Increment the number of processes by one
|
||||
- **TTOU**: Decrement the nunber of processes by one
|
||||
- **USR1**: Reopen the log files
|
||||
- **USR2**: Upgrade the Gunicorn on the fly. A separate **QUIT** signal should
|
||||
be used to kill the old process. This signal can also be used to use the new
|
||||
versions of pre-loaded applications.
|
||||
- **WINCH**: Gracefully shutdown the worker processes when gunicorn is
|
||||
daemonized.
|
||||
|
||||
Worker process
|
||||
==============
|
||||
|
||||
Sending signals directly to the worker processes should not normally be
|
||||
needed. If the master process is running, any exited worker will be
|
||||
automatically respawned.
|
||||
|
||||
- **TERM**, **INT**: Quick shutdown
|
||||
- **QUIT**: Graceful shutdown
|
||||
- **USR1**: Reopen the log files
|
||||
Loading…
x
Reference in New Issue
Block a user