首页 > 其他 > 详细

Nginx(3) - Controlling nginx

时间:2016-02-01 18:53:41      阅读:217      评论:0      收藏:0      [点我收藏+]

Controlled with signals:

master process:

TERM, INT fast shutdown
QUIT graceful shutdown
HUP changing configuration, keeping up with a changed time zone (only for FreeBSD and Linux), starting new worker processes with a new configuration, graceful shutdown of old worker processes
USR1 re-opening log files
USR2 upgrading an executable file
WINCH graceful shutdown of worker processes

worker process:

TERM, INT fast shutdown
QUIT graceful shutdown
USR1 re-opening log files
WINCH abnormal termination for debugging (requires debug_points to be enabled)

Changing Configuration (FreeBSD 4.x)

ps axw -o pid,ppid,user,%cpu,vsz,wchan,command | egrep ‘(nginx|PID)‘

Rotating Log-files

In order to rotate log files, they need to be renamed first. After that USR1 signal should be sent to the master process.

Upgrading Executable on the Fly

In order to upgrade the server executable, the new executable file should be put in place of an old file first. After that USR2 signal should be sent to the master process.

/usr/local/nginx/logs/nginx.pid.oldbin

Nginx(3) - Controlling nginx

原文:http://www.cnblogs.com/thlzhf/p/5175607.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!