PHP-FPM running status of real-time viewing and monitoring detailed _php skills

Source: Internet
Author: User
Tags fpm

Objective

We all know that PHP-FPM has a built-in status page, opened to view the detailed operation of the PHP-FPM, to PHP-FPM optimization to bring help.

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

Pm.status_path =/phpfpm_status

Configure Nginx.conf to add an accessible server

server {
  listen;
  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
  }
}

Reboot or overload Nginx, and PHP-FPM

Service php-fpm Restart
service Nginx restart

Browser Access results:


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

Http://www.foo.bar/status #默认纯文本
Http://www.foo.bar/status?json #json格式
http://www.foo.bar/status?html # HTML format
http://www.foo.bar/status?xml #xml格式
 
#full参数可查看进程详细信息
http://www.foo.bar/status?full
Http://www.foo.bar/status?json&full
http://www.foo.bar/status?html&full
http://www.foo.bar/ Status?xml&full

PHP-FPM Status Parameter Description:

POOL–FPM pool name, mostly for WWW process
manager– process Management, value: Static, dynamic or OnDemand. Dynamic start
time– start date if Reloa D PHP-FPM, the time will update the
start since– run time
accepted conn– the number of requests received by the current pool
listen queue– request Wait queue, if this value is not 0, Then the number of processes to increase FPM
Max listen queue– request wait queue the highest number
Listen queue len–socket wait Queue Length
idle processes– idle Process number
Active processes– Active Process quantity
total processes– number max active
processes– Max active process number (FPM start calculation)
Max children R Eached-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

Summarize

The above is the entire content of this article, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange.

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.