简体   繁体   English

Nginx是否有退出的机会?

[英]Does nginx have a soft quit?

Does anyone know if nginx supports soft quits? 有人知道nginx是否支持软退出吗? Meaning does it stay running until all connections are either gone or timed out (past a specific time interval) and also not allow new connections during this time period? 这意味着它会一直运行直到所有连接都消失或超时(过去一个特定的时间间隔),并且在此时间段内也不允许新连接吗?

For example: 例如:

nginx stop
nginx running (2 connections active and blocking any new connections)
nginx running (1 connection active)
nginx stopped (0 connections active)

man nginx 曼宁克斯

 -s signal      Send signal to the master process. The argument signal can be
                one of: stop, quit, reopen, reload.

                The following table shows the corresponding system signals.

                stop    SIGTERM
                quit    SIGQUIT
                reopen  SIGUSR1
                reload  SIGHUP

Specifically, you want SIGQUIT. 具体来说,您需要SIGQUIT。 In layperson's terms: 用外行的话来说:

  • stop — fast shutdown stop —快速关机
  • quit — graceful shutdown quit —正常关机
  • reload — reloading the configuration file reload —重新加载配置文件
  • reopen — reopening the log files reopen —重新打开日志文件

See also: http://nginx.org/en/docs/control.html for details, and http://nginx.org/en/docs/beginners_guide.html#control for a quick reference. 另请参见: http : //nginx.org/en/docs/control.html了解详细信息,以及http://nginx.org/en/docs/beginners_guide.html#control了解快速参考。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM