Check the running status of PHP-FPM

1 PHP-FPM has a built-in status page. After opening it, you can view the detailed operating status of PHP-FPM, which will help optimize PHP-FPM.

 

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

pm.status_path = /hdfphpss/

 

Configure nginx.conf, add accessible server

 

 

server {    listen       80;    server_name  127.0.0.1;  
    location /hdfphpss/ {        include fastcgi_params;        fastcgi_pass 127.0.0.1:9000;        fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
    }
}

 

Restart or reload nginx, and php-fpm

 

 

service php-fpm restart
service nginx restart


Curl access results (browser can also be used):

$ curl 127.0.0.1/hdfphpss/


 

Save text (default)
$ curl 127.0.0.1/hdfphpss/   


json format

$ curl 127.0.0.1/hdfphpss/?json


html format
$ curl 127.0.0.1/hdfphpss/?html


xml format
$ curl 127.0.0.1/hdfphpss/?xml

 

 

PHP-FPM status parameter description:

 

 

pool – fpm pool name, most of them are www
process manager – process management method, value: static, dynamic or ondemand. dynamic
start time – start date, if php-fpm is reloaded, the time will be updated
start since – run time
accepted conn – The number of requests accepted by the current pool
listen queue-request waiting queue, if this value is not 0, then increase the number of FPM processes
max listen queue-the highest number of request waiting queue
listen queue len-socket waiting queue length
idle processes-idle processes Quantity
active processes –
total number of active processes total processes – total number of
processes max active processes – maximum number of active processes (calculated from the start of FPM)
max children reached-number of times the maximum number of road processes is limited, if this number is not 0, it means you The maximum number of processes is too small, please change it to a larger one.
slow requests-php-fpm slow-log is enabled, the number of slow requests

 

Guess you like

Origin blog.csdn.net/an17822307871/article/details/112761712