Ready to know about downtime before your customers?
Status List delivers uptime monitoring and professional hosted status pages for sites of all shapes and sizes.
Trusted by 1000+ companies
Locate the configuration file for your www pool. Usually it’s located at /etc/php-fpm.d/www.conf.
Enable the pm.status_path parameter by setting it to /php-fpm/status.
pm.status_path=/php-fpm/status
php-fpm -t
location /php-fpm/status {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index /php-fpm/status;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
nginx -t
Trusted by 1000+ companies
ProxyPass "unix:/var/run/php-fpm.sock|fcgi://127.0.0.1/php-fpm/status"
httpd -t
location /php-fpm/status {
allow 127.0.0.1; # restrict to localhost
allow 10.0.0.0/8; # restrict to internal ips
deny all; # don't allow anyone else
# ... your standard fastcgi params
}
nginx -t
nginx -s reload
Order Allow,Deny
Allow from 127.0.0.1 10.0.0.0/8
# ... your standard fastcgi params
httpd -t
service httpd restart
Open http://127.0.0.1/php-fpm/status?full to view PHP-FPM’s complete status page. You can also get a condensed page at http://127.0.0.1/php-fpm/status, or in json format at http://127.0.0.1/php-fpm/status?json.
The status page shows manager level statistics and per-process stats. Depending on what you’re trying to debug, different sections may be helpful.
Here’s what my status page looks like:
pool: www
process manager: dynamic
start time: 17/Apr/2023:16:31:51 +0000
start since: 203
accepted conn: 16
listen queue: 0
max listen queue: 0
listen queue len: 0
idle processes: 5
active processes: 1
total processes: 6
max active processes: 2
max children reached: 0
slow requests: 0
************************
pid: 12493
state: Idle
start time: 17/Apr/2023:16:31:51 +0000
start since: 203
requests: 3
request duration: 148003
request method: POST
request URI: /wp-cron.php?doing_wp_cron=0000000.0000000000000000
content length: 0
user: -
script: /opt/marketing/wordpress/wp-cron.php
last request cpu: 67.57
last request memory: 6291456
************************
pid: 12494
state: Idle
start time: 17/Apr/2023:16:31:51 +0000
start since: 203
requests: 3
request duration: 219
request method: GET
request URI: /status2?all
content length: 0
user: -
script: /opt/marketing/wordpress/status2
last request cpu: 0.00
last request memory: 2097152
(repeating for each PID)
Here is an explanation of the metrics shown on the status page. Most are self explanatory, but here’s the nitty gritty details.
Trusted by 1000+ companies
Integrations allow you to track metrics from the PHP-FPM status page and create warning alerts. If you have a status page that you don’t look at, it’s not that useful. But, piping the data into a 3rd party can make it very useful for you and your team.
Here are some guides on how to integrate your PHP-FPM status page into specific providers.
- module: openmetrics
metricsets: ['collector']
period: 10s
hosts: ["127.0.0.1:80"]
metrics_path: /php-fpm/status
instances:
- openmetrics_endpoint: http://127.0.0.1/php-fpm/status
namespace: php-fpm
metrics:
- .+:
type: gauge
service datadog-agent start
Your data should start appearing in your dashboard within a few minutes.
Read more in the Datadog Openmentrics Documentation
Your PHP-FPM status page has some valuable insights on the performance of your application. Here are a few key insights we’ve used to improve our performance.
If you watch these properties, you’ll be able to narrow down most performance issues. Your site will be snappier and your customers will be happier.
© Status List 2024