码迷,mamicode.com
首页 > 其他好文 > 详细

Nginx的信号控制

时间:2019-06-26 01:14:36      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:open   oca   table   信号控制   width   引号   new   ati   无需重启   

信号列表:

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      -------->无需重启nginx,平滑的重读配置文件

 或者不直接使用进程号(单引号中为nginx下 ):

  Kill -信号控制 `cat /***/nginx/logs/nginx.pid`  例如: kill- USR1 `cat /usr/local/nginx/logs/nginx.pid`    -------->重读日志,在日志按月/日分割时有用

Nginx的信号控制

标签:open   oca   table   信号控制   width   引号   new   ati   无需重启   

原文地址:https://www.cnblogs.com/Garnett-Boy/p/11087323.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!