Home>Article>Backend Development> How to restart linux php-fpm
1. Start php-fpm
/Data/apps/php7/sbin/php-fpm
2. A simple and direct restart method: first check the master process number of php-fpm
ps aux|grep php-fpmroot 21891 0.0 0.0 112660 960 pts/3 R+ 16:18 0:00 grep --color=auto php-fpm
3. Restart php-fpm
kill -USR2 42891
4. The id file path should be located at /usr/local/php/var/run/php-fpm.pid. Since it is commented out, it is not generated. We remove the comment. Then kill -USR2 42891 to restart php-fpm, the pid file will be generated. Next time you can use the following command to restart and close php-fpm
5. php-fpm close
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'
Recommended tutorial:PHP video tutorial
The above is the detailed content of How to restart linux php-fpm. For more information, please follow other related articles on the PHP Chinese website!