Nginx (3)-controlling nginx

Source: Internet
Author: User

Controlled with signals:

Master process:

term, INT fast shutdown
QUITGraceful shutdown
HUPChanging configuration, keeping up with a changed time zone (only for FreeBSD and Linux), starting new worker Processes with a new configuration, graceful shutdown of the old worker processes
USR1re-opening log files
USR2Upgrading an executable file
WINCHGraceful shutdown of worker processes

Worker process:

term, intfast shutdown
QUITGraceful shutdown
USR1re-opening log files
WINCHAbnormal 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 is sent to the master process.

Upgrading executable on the Fly

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

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

Nginx (3)-controlling nginx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.