Home  >  Article  >  Backend Development  >  How to shut down php service correctly

How to shut down php service correctly

王林
王林Original
2020-11-09 17:10:425270browse

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.

How to shut down php service correctly

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!

Statement:
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