The pool of PHP-FPM
NIGNX can configure multiple virtual hosts, PHP-FPM also support the configuration of multiple pool, each pool can listen to a port, can also listen to a socket.
PHP-FPM Configuration Instructions:
Unlike
How to Use the supervisor to guard the main php-fpm process for Automatic Restart of php-fpm, supervisorphp-fpm
Recently, a colleague has a monitoring requirement for the php-fpm process, that is, if the master process of the php-fpm unexpectedly
Php-FPM configuration in nginx tutorialNginx can directly call FPM to drive php and then discard apache. Let's not talk about the reason.First download the php5.4 installation package.According to others The code is as follows:Copy code .
PHP-fpm has been finalized since php 5.4 RC2 and is no longer labeled as EXPERIMENTAL (EXPERIMENTAL stuff) [2-3] By the php team.Compared with Spawn-FCGI, PHP-FPM has better control over CPU and memory, and the former is easy to crash and must be
Recently, a colleague has a guardianship requirement for the PHP-FPM process, i.e. if the master process of PHP-FPM quits unexpectedly (possibly crash, it could be a false kill), then the master process is expected to be pulled automatically to
After loading nginx and php-5.5, configure the Nginx to invoke PHP and start php-fpm.
Use the following command
Copy Code code as follows:
/usr/local/php/sbin/php-fpm
You can start it up.
Create a PHP detection script in the
First, process tracking
The code is as follows
Copy Code
# Top//Find process PID with high CPU usage# Strace-p PID//tracking process# LL/PROC/PID/FD//See which files the process is working on
There will be
Recently, a colleague has a guardianship requirement for the PHP-FPM process, i.e. if the master process of PHP-FPM quits unexpectedly (possibly crash, it could be a false kill), then the master process is expected to be pulled automatically to
PHP-FPM for performance optimization and PHP-FPM performance optimization
Brief introduction:
PHP-FPM is a PHP FastCGI manager, General Nginx above the PHP program will throw PHP program to PHP-FPM to parse. All right, that's it!
PHP 5.4 began to
Nginx itself can not handle PHP, it is just a Web server, when the request is received, if it is a PHP request, then sent to the PHP interpreter processing, and the results returned to the client.
Nginx is generally the request to send fastcgi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.