nginx 信號量

TERM, INT

Quick shutdown

QUIT

Graceful shutdown  優雅的關閉進程,即等請求結束後再關閉

HUP

Configuration reload ,Start the new worker processes with

 a new configuration Gracefully shutdown the old worker processes

改變配置文件,平滑的重讀配置文件

USR1

Reopen the log files 重讀日誌,在日誌按月/日分割時有用

USR2

Upgrade Executable on the fly 平滑的升級

WINCH

Gracefully shutdown the worker processes 優雅關閉舊的進程(配合USR2來進行升級)

 

具體語法:

Kill -信號選項 nginx的主進程號

Kill -HUP 4873

 

Kill -信號控制 `cat /xxx/path/log/nginx.pid`

 

Kill -USR1 `cat /xxx/path/log/nginx.pid`

 

除了信號量,我們也可以使用nginx 的命令參數進行stop,quit, reopen,reload

如下:

stop 對應QUIT,quit對應TERM, INT,reopen對應USR1,reload對應HUP

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章