nginx process management - Signal

Process Structure: a master process and multiple sub-processes.

Child process divided into two categories: one is the Worker process, the other is the Cache related processes.

master process: Worker process management, sending a signal.

receive signal:

     TERM / INT, immediately stop the process;
     the QUIT, elegant exit, and so on until they have finished processing the request exits;
     HUP, reload the configuration file;
     USR1, re-open the log file, do the cutting of the log file;
     USR2, hot upgrade the first phase, started new process. Old Master Nginx master process will rename the file to its own process .oldbin, and then perform a new version of Nginx. At this point the old and new Nginx processes will run at the same time, co-processing request;
     WINCH, hot second stage upgrade, stop the old process. Phasing out the old version of Nginx Worker process is finished it will exit with the task, the new version of the Nginx Worker process will gradually replace the old version Worker process.

work process: processing tasks.

Received signal: TERM / INT, QUIT, USR1, WINCH.

cache manager process: cache management.

cache loader process: Cache loaded.

nginx signal corresponding to the command:

     reload: HUP;
     reopen: USR1;
     stop: TERM;
     quit: QUIT。

 

Guess you like

Origin www.cnblogs.com/imcati/p/11781476.html