gpt4 book ai didi

nginx - nginx 有软退出吗?

转载 作者:行者123 更新时间:2023-12-04 13:02:26 30 4
gpt4 key购买 nike

有谁知道nginx支持软退出吗?这意味着它会一直运行直到所有连接都消失或超时(超过特定时间间隔)并且在此期间也不允许新连接吗?

例如:

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

最佳答案

ma​​n 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

具体来说,您需要 SIGQUIT。用外行的话来说:

  • stop — 快速关闭
  • quit — 正常关机
  • reload — 重新加载配置文件
  • reopen — 重新打开日志文件

另请参阅:http://nginx.org/en/docs/control.html有关详细信息,和 http://nginx.org/en/docs/beginners_guide.html#control以供快速引用。

关于nginx - nginx 有软退出吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10198790/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com