有谁知道nginx是否支持软退出?这意味着它是否会一直运行直到所有连接都消失或超时(超过特定时间间隔)并且在此时间段内也不允许新连接?
例如:
nginx stop
nginx running (2 connections active and blocking any new connections)
nginx running (1 connection active)
nginx stopped (0 connections active)
有谁知道nginx是否支持软退出?这意味着它是否会一直运行直到所有连接都消失或超时(超过特定时间间隔)并且在此时间段内也不允许新连接?
例如:
nginx stop
nginx running (2 connections active and blocking any new connections)
nginx running (1 connection active)
nginx stopped (0 connections active)
男人 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快速参考。