How to close parameters of php-fpm: Use [PHP-FPM] to control the FastCGI process of [PHP-CGI], the code is [kill -INT cat /usr/local/php/var/run/php -fpm.pid].
How to turn off parameters in php-fpm:
Let’s first 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 can be used after compiling and installing PHP.
Now we can download the branch that directly integrates PHP-FPM in the latest PHP 5.3.2 source tree. 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, which 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. You can enable PHP-FPM 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 and terminate immediately
QUIT Smooth termination
USR1 Reopen the log file
USR2 Smoothly reload all worker processes and reload configuration and binary modules
Example:
php-fpm Close:
The code is as follows
kill -INT cat /usr/local/php/var/run/php-fpm.pid
php -fpm restart:
The code is as follows
kill -USR2 cat /usr/local/php/var/run/php-fpm.pid
View the number of php-fpm processes:
The code is as follows
ps aux | grep -c php-fpm
php-fmp Restart (Method 2)
First execute
The code is as follows
killall php-fpm
then execute (usr/local/php is the installation directory of php)
The code is as follows
/usr/local/php/sbin/php-fpm &
If you want to learn more about programming, please pay attention to the php training column!
The above is the detailed content of How to turn off parameters in php-fpm. For more information, please follow other related articles on the PHP Chinese website!