Today I will introduce to you the php-fpm process shutdown and restart commands. PHP-FPM is a PHP FastCGI manager. It is only used for PHP and PHP5.3.3 has integrated php-fpm. No. It’s a third-party package again.
First, let’s understand what php-fpm is
PHP-FPM is a PHP FastCGI manager, only for PHP.
PHP-FPM is actually a patch of the PHP source code, designed to integrate FastCGI process management into the PHP package. It must be patched into your PHP source code, and it can be used after compiling and installing PHP. Now we can download the branch that directly integrates PHP-FPM in the source tree of the latest PHP 5.3.2. It is said that the next version will be integrated into the main branch of PHP. Compared with Spawn-FCGI, PHP-FPM has better CPU and memory control, and the former crashes easily and must be monitored with crontab, while PHP-FPM does not have such troubles.
PHP5.3.3 has integrated php-fpm and is no longer a third-party package. PHP-FPM provides a better PHP process management method, can effectively control memory and processes, and can smoothly reload PHP configuration. It has more advantages than spawn-fcgi, so it is officially included in PHP. PHP-FPM can be turned on by passing the –enable-fpm parameter in ./configure. Use PHP-FPM to control the FastCGI process of PHP-CGI
The master process can understand the following signals
INT, TERM terminate immediately
QUIT smooth termination
USR1 Reopen log file
USR2 smoothly reloads all worker processes and reloads configuration and binary modules
Example:
php-fpm closed:
The code is as follows
|
Copy code
|
||||||||||||||||||||||
php-fpm restart:
|