开启php-fpm状态页有助于我们分析当前php请求的情况,来决定php-fpm参数是否设置合理。
nginx配置:
location /status { fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_pass unix:/dev/shm/php-cgi.sock; }
php-fpm配置:
pm.status_path = /status
状态页sample:
pool: www process manager: static start time: 20/Sep/2013:15:59:36 +0900 start since: 944 accepted conn: 300499 listen queue: 0 max listen queue: 0 listen queue len: 0 idle processes: 999 active processes: 1 total processes: 1000 max active processes: 438 max children reached: 0 slow requests: 0
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/58102.html