PHP-FPM ships with a status endpoint that reports active workers, queue depth, slow requests, and total processed — the data you need to size a pool properly. cPanel does not enable it by default, and even when operators enable it they sometimes leave it open to the internet. Enabling it is one config line per pool plus an Apache include that restricts access to the metrics scraper.
What’s happening
The status page is a feature of PHP-FPM itself. When pm.status_path = /status is set in a pool config, FPM serves a JSON or plain-text response from that path. Apache forwards the path to FPM the same way it forwards any other PHP request. Without an Apache-level restriction, anyone hitting https://example.com/status gets the metrics — including total request count, which is information leakage even if no secrets are exposed.
How to verify
Confirm the status path is configured and locked down:
grep -r "pm.status_path" /opt/cpanel/ea-php82/root/etc/php-fpm.d/
curl -s http://127.0.0.1/status?full
apachectl -t -D DUMP_INCLUDES | grep status
The first command shows which pools have a status endpoint. The second tests it locally (should return data). If curl from outside the host also works, the endpoint is exposed.
The fix
- Edit the pool config (or use MultiPHP Manager > FPM Settings > Edit > add to the pool’s INI) and add:
pm.status_path = /fpm-status ping.path = /fpm-ping ping.response = pong - Add an Apache restriction via WHM > Apache Configuration > Include Editor > Post VirtualHost Include (scoped to the domain):
Add the IP of your metrics scraper to the list. Do not use<LocationMatch "^/(fpm-status|fpm-ping)$"> Require ip 127.0.0.1 Require ip ::1 Require ip 10.0.0.0/8 </LocationMatch>Require all granted. - Reload FPM and Apache:
systemctl reload ea-php82-php-fpm && apachectl graceful. - Test from the host:
curl -s http://127.0.0.1/fpm-status?full. Read the response — fields includetotal processes,active processes,idle processes,listen queue,listen queue len,max children reached,slow requests. - The numbers that matter for sizing:
max children reachedshould be 0 over a 24-hour window. If non-zero, increasepm.max_children.listen queuenon-zero during peak means workers are saturated.slow requestsnon-zero meansrequest_slowlog_timeoutis firing. - Plug the endpoint into your metrics stack (Prometheus’s
php-fpm-exporter, Datadog’s PHP-FPM integration). Trend the active worker count over time and alert at 80% ofpm.max_children.
For environments where pool sizing is observability-driven, Stack Harbor wires FPM metrics into the customer console under environment management.