Real-time viewing and monitoring of PHP-FPM running state configuration

Source: Internet
Author: User
Tags fpm

PHP-FPM has a built-in status page, opened to view the detailed operation of PHP-FPM, to php-fpm optimization to bring help. The following article will record how to view and monitor the PHP-FPM running status in real time.

Open php-fpm.conf, configure PHP-FPM Status page options

Pm.status_path =/phpfpm_status (default is: status)

Configure NGINX.CONF to add accessible server (not to be placed in HTTP)

server {
Listen 80;
server_name 127.0.0.1;
Location/phpfpm_status {
Fastcgi_pass 127.0.0.1:9000;
Include Fastcgi_params;
Fastcgi_param script_filename $fastcgi _script_name;
}
}

Restart or overload Nginx, and PHP-FPM, as follows:

Service PHP-FPM Restart
Service Nginx Restart

The browser access results are shown below:

You can also view the PHP-FPM status output format with different parameters:

Http://www.111cn.net/status #默认纯文本
Http://www.111cn.net/status?json #json格式
Http://www.111cn.net/status?html #html格式
Http://www.111cn.net/status?xml #xml格式

You can also view process details by using the full parameter:

Http://www.111cn.net/status?full
Http://www.111cn.net/status?json&full
Http://www.111cn.net/status?html&full
Http://www.111cn.net/status?xml&full

Now pay for the PHP-FPM status parameter details:

POOL–FPM pool name, most of which are www

Process manager– processes management method, value: Static, dynamic or OnDemand. Dynamic

Start time– launch date, if Reload php-fpm, time will be updated

Start since– run time long

Accepted conn– the number of requests received by the current pool

Listen queue– request Wait queue, if this value is not 0, then increase the number of FPM processes

Max Listen queue– request wait queue highest number

Listen queue Len–socket wait queues length

Idle processes– number of idle processes

Active processes– dynamic number of processes

Total processes– Process Quantity

Max Active processes– Maximum activity number (FPM start count)

Max children reached-the number of maximum limit of the path process, if this number is not 0, that means that your maximum number of processes is too small, please change the larger.

Slow requests– enabled PHP-FPM Slow-log, number of slow requests

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.