Semaphore is nginx

 Reference article: https://blog.51cto.com/5660061/2380428

 

Nginx semaphore of:

TERM, INT quickly end the application, equivalent to the kill -9 pid

QUIT elegant end nginx process, not new requests, finished processing the current request has been received, after closing the application, nginx -s quit 

HUP change the configuration file, the configuration file is reread smooth, i.e., can be achieved without restarting the application to reload the configuration file, equivalent to nginx -s reload

USR1 reread the log, the log is useful in monthly / day split. The only determine the file name in the linux system is the inode. When the program is running nginx, log files points to the inode access.log this file, this file uniquely determined.

            When nginx in the operation, we execute the mv command to move or rename the log file, mv command itself does not change the inode property, so even if the implementation of the mv command, but still point to a log file inode at the beginning, the role USR1 is to re-open log files,

            That is redirected to the new access.log the inode, equivalent to nginx -s reopen

USR2 smooth upgrade nginx version, the project will not be the opportunity to run the project to upgrade nginx version

WINCH elegant turn off the old process (with USR2 to upgrade)

Guess you like

Origin www.cnblogs.com/cheng21553516/p/11204604.html