First, to understand what a php-fpm is.
PHP-FPM is a PHP fastcgi manager that is used only for PHP.
PHP-FPM is actually a patch of PHP source code designed to integrate FASTCGI process management into a PHP package. It must be patch into your PHP source code and can be used after compiling and installing PHP. Now we can download in the latest PHP 5.3.2 source tree to directly integrate the PHP-FPM branch, it is said that the next version will be fused into the main branch of PHP. Relative SPAWN-FCGI,PHP-FPM in the CPU and memory control are better, and the former is easy to crash, must be monitored with crontab, and PHP-FPM does not have this annoyance.
PHP5.3.3 has integrated php-fpm, no longer a third-party package. PHP-FPM provides a better way to manage the PHP process, can effectively control memory and process, can be smooth overloaded PHP configuration, more than spawn-fcgi has more advantages, so by the official PHP included. The PHP-FPM can be turned on with the –ENABLE-FPM parameter when the./configure. Using PHP-FPM to control the fastcgi process of php-cgi
(www.111cn.net)
The master process can understand the following signals
INT, term immediately terminates
QUIT Smooth Termination
USR1 Reopen log file
USR2 smoothly overloads all worker processes and reloads the configuration and binary modules
Example:
PHP-FPM off:
Code to copy code as follows
Kill-int ' Cat/usr/local/php/var/run/php-fpm.pid '
PHP-FPM Restart:
Code to copy code as follows
KILL-USR2 ' Cat/usr/local/php/var/run/php-fpm.pid '
To view the number of PHP-FPM processes:
Code to copy code as follows
PS aux | Grep-c PHP-FPM
Restart of the PHP-FMP (method two)
Execute first
Code to copy code as follows
Killall PHP-FPM
Re-execute (usr/local/php is the PHP installation directory)
Code to copy code as follows
/USR/LOCAL/PHP/SBIN/PHP-FPM &
From:http://www.111cn.net/phper/php-gj/52906.htm
PHP-FPM process shutdown and restart script