Real-Time View and monitoring of PHP-FPM running status

Source: Internet
Author: User
View and monitor the running status of PHP-FPM in real time

Everyone knows that the PHP-FPM has built-in status page, after enabling can view the detailed running status of the PHP-FPM, to bring help to the PHP-FPM optimization.

Open php-fpm.conf, configure php-fpm status page options

pm.status_path = /phpfpm_status

Configure nginx. conf and add accessible server

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 reload nginx, and php-fpm

service php-fpm restartservice nginx restart

Browser access result:

You can view the output format of php-fpm status with different parameters:

Http://www.foo.bar/status # default plain text http://www.foo.bar/status? Json # json format http://www.foo.bar/status? Html # html format http://www.foo.bar/status? Xml # xml Format # can the full parameter view the process details http://www.foo.bar/status? Fullhttp: // www. foo. bar/status? Json & fullhttp: // www. foo. bar/status? Html & fullhttp: // www. foo. bar/status? Xml & full

PHP-FPM status parameter description:

Pool-fpm pool sub-name, mostly for wwwprocess manager-process management mode, value: static, dynamic or ondemand. dynamicstart time-start date. If php-fpm is Reloaded, the time will update start since-run duration accepted conn-number of requests received by the current pool listen queue-request waiting queue, if the value is not 0, increase the number of FPM processes max listen queue-maximum number of request waiting queues listen queue len-socket wait queue length idle processes-number of idle processes active processes-number of active processes total processes- total number of processes max active processes-maximum number of active processes (starting from FPM) max children r The maximum number of eached-Avenue processes. if the number is not 0, it indicates that the maximum number of processes is too small. Please increase the number. Slow requests-php-fpm slow-log enabled, 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.