Home > Backend Development > PHP Problem > How to restart linux php-fpm

How to restart linux php-fpm

王林
Release: 2023-02-26 16:30:01
Original
24445 people have browsed it

How to restart linux php-fpm

1. Start php-fpm

/Data/apps/php7/sbin/php-fpm
Copy after login

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
Copy after login

3. Restart php-fpm

kill -USR2 42891
Copy after login

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'
Copy after login

php -fpm restart:

kill -USR2 'cat /usr/local/php/var/run/php-fpm.pid'
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template