Home > Article > Backend Development > How to shut down php service correctly
The correct way to close the php service: Execute the [kill -INT `cat /usr/local/php/var/run/php-fpm.pid`] command to close the php service.
php-fpm under php 5.3.3 no longer supports /usr/local/php/sbin/php-fpm (start |stop|reload) and other commands, you need to use signal control:
(Learning video recommendation: java video tutorial)
INT TERM Terminate immediately
QUIT Smooth termination
USR1 Reopen the log file
USR2 Smoothly reload all worker processes and reload configuration and binary modules
kill -INT `cat /usr/local/php/var/run/php-fpm.pid`
php-fpm Restart:
kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid` ps aux | grep -c php-fpm
Related recommendations: php training
The above is the detailed content of How to shut down php service correctly. For more information, please follow other related articles on the PHP Chinese website!