Skip to content

PHP-FPM status page: what every metric means

PHP-FPM's built-in status page exposes real-time pool health metrics. Learn what each field means, how to expose it safely, and which numbers to alert on.

PHP-FPM ships a built-in status endpoint that exposes real-time pool metrics — active workers, idle workers, listen queue depth, and request counters — with no external agent required. Most operators enable it during initial setup and then forget to look at it until something breaks. Understanding what each metric means and wiring it into your monitoring stack lets you catch saturation, misconfiguration, and memory pressure before they become incidents.

How to verify

Check whether the status page is configured and reachable:

grep 'pm.status_path\|pm.ping' /etc/php/8.3/fpm/pool.d/www.conf
# Assuming Nginx is configured to proxy /status to FPM
curl -s http://127.0.0.1/status
curl -s http://127.0.0.1/status?full   # per-process details
curl -s http://127.0.0.1/status?json   # machine-readable
curl -s http://127.0.0.1/ping          # lightweight health check

What’s happening

The FPM master process writes pool statistics to a shared memory segment. When Nginx proxies a request to the status path, FPM reads from that segment and formats a text or JSON response — no disk I/O, no worker allocation beyond the one serving the status request. The status endpoint is essentially free to poll.

The status page reports metrics at two scopes: the pool as a whole (totals and current state) and optionally per-process (?full). The pool-level metrics are what you want for alerting; per-process output is useful for debugging a specific abnormal worker.

Metric reference

Pool-level fields:

FieldWhat it means
poolPool name from the [header] in the pool config
process managerThe pm mode: static, dynamic, or ondemand
start timeWhen the FPM master last started (or reloaded)
start sinceSeconds since start
accepted connTotal FastCGI connections accepted since start — monotonically increasing
listen queueRequests waiting because all workers are busy. Non-zero is a saturation signal.
max listen queuePeak listen queue depth since start — useful for detecting past saturation you missed
listen queue lenThe OS-level backlog size (listen.backlog)
idle processesWorkers with no active request
active processesWorkers currently executing a request
total processesidle + active; bounded by pm.max_children
max active processesPeak concurrent workers since start
max children reachedTimes FPM hit pm.max_children and had to queue incoming requests. Every increment is a saturation event.
slow requestsRequests that exceeded request_slowlog_timeout

Per-process fields (?full):

FieldWhat it means
pidOS process ID of the worker
stateIdle, Running, or Finishing
start timeWhen this worker was forked
start sinceSeconds since fork — very high values with Running state indicate a stuck request
requestsRequests this worker has handled since it was forked
request durationMicroseconds the current (or last) request has been running
request methodHTTP method of the current request
request uriURI being handled — useful for identifying which page is slow
content lengthPOST body size in bytes
userHTTP Basic Auth user, if any
scriptPHP script path being executed
last request memoryPeak memory for the last completed request
last request cpuCPU seconds for the last completed request

The procedure

1. Enable the status page in the pool.

pm.status_path = /status
pm.ping.path = /ping
pm.ping.response = pong

2. Expose it through Nginx without making it public.

server {
    listen 127.0.0.1:80;
    server_name localhost;

    location = /status {
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        allow 127.0.0.1;
        deny all;
    }

    location = /ping {
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        allow 127.0.0.1;
        deny all;
    }
}

3. Set up polling.

For Prometheus, use the php-fpm_exporter:

docker run --rm -d \
  -p 9253:9253 \
  -e PHP_FPM_SCRAPE_URI="tcp://127.0.0.1:9000/status" \
  hipages/php-fpm_exporter

For a simpler approach, poll the JSON endpoint from a shell and push to your metrics store:

curl -s 'http://127.0.0.1/status?json' | \
  jq '{listen_queue: .["listen queue"], active: .["active processes"], max_children_reached: .["max children reached"]}'

4. Define alerting thresholds.

MetricAlert condition
listen queueGreater than 0 for more than 30 seconds
max children reached (rate)Increments more than 10 times per minute
active processes / total processesRatio above 0.85 consistently
slow requests (rate)Any increment if request_slowlog_timeout is tuned correctly
Worker start since in Running stateGreater than your max_execution_time ini setting

Common pitfalls

Exposing the status page to the public internet. The status page leaks internal script paths, URIs, and user agents. Always restrict it to 127.0.0.1 or a private monitoring network.

Polling at too high a frequency. The status page is cheap but not free — it occupies a worker slot for the duration of the FastCGI request. Polling every 1 second across 20 pools on a shared server creates non-trivial load. Poll every 15–30 seconds for monitoring; use /ping for health checks if you need sub-5-second liveness detection.

Interpreting accepted conn as a per-second rate without context. This counter resets to zero on every FPM reload (SIGUSR2). If your monitoring system computes a rate across a reload boundary, the rate will spike artificially or go negative. Track reloads alongside this counter.

Ignoring max active processes after a quiet period. If max active processes is equal to pm.max_children, you hit saturation at some point. Check max listen queue and max children reached together to understand whether you queued requests during that peak.

Not enabling the status page at all. It is disabled by default. Without it, diagnosing FPM saturation in production requires guessing from access log response times and system memory stats — which is possible but much slower.

For teams that want FPM metrics integrated into their existing observability stack with alerting configured for their specific traffic patterns, the Stack Harbor managed operations service handles the full monitoring pipeline.