How to turn on and off php-fpm under linux

PHPz
Release: 2023-05-16 16:52:14
forward
1396 people have browsed it

So the way of starting, shutting down and reloading is different from before, you need to use signal control:

php-fpm master process can understand the signal:

sigint, sigterm terminate immediately
sigquit Smooth termination
sigusr1 Reopen the log file
sigusr2 Smoothly reload all worker processes and reload configuration and binary modules

For example:

Close php- fpm

kill -sigint `cat /usr/local/php/var/run/php-fpm.pid`
Copy after login

php-fpm Restart

ill -sigusr2 `cat /usr/local/php/var/run/php-fpm.pid`
Copy after login

Note: /usr/local/php/var/run/php-fpm.pid refers to the file that stores the master process number. This is the default address. It can be modified in the configuration. In addition, you can use the ps command to find the master's process number, and then use the kill signal process number.

What versions of Linux are there?

Linux versions include: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and other versions. Among them, Deepin is one of the best-developed Linux distributions in China; Ubuntu Kylin is a derivative distribution based on Ubuntu; Manjaro is a Linux distribution based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP and is simple and easy to use; Ubuntu is a desktop application Mainly Linux operating system.

The above is the detailed content of How to turn on and off php-fpm under linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
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