PHP-FPM

Common parts of every card (states, backoff, Unit and ExecReload, Test config, manual commands) are described in Monitor window.
| Detected by | systemd units php*-fpm or binaries php-fpm* |
| Read every | 60 s while the Monitor window shows the tab |
| Active probe | none |
| Test config | on demand |
What the card reads and shows
Section titled “What the card reads and shows”PHP-FPM: installations (one per php-fpm.conf, several PHP versions side by side), their pools (account, listen, process manager and its limits), worker processes per pool from ps and the last “server reached max_children” warning of each pool from the FPM log.
Passive: files, ps, /proc/mounts; rpm -q (the version of /etc/php-fpm.conf installs) with the active probe only. Everything is filtered on the host: from the configuration only a closed list of keys with values of plain characters (no env[...], php_admin_value[...], comments or multi-line strings), from ps only the FPM process titles, from the log only the pool, time and limit of the max_children warning.
Card layout
Section titled “Card layout”One collapsible block per installation, titled PHP php-fpm.conf), not running, or
running: unknown when processes could not be read; an orange max_children chip when any
pool is at its limit or hit it according to the log.
Lines under the title: Configuration (path of php-fpm.conf), Master (pid, account),
Log (the FPM error_log), and notes in orange:
- Known only from a running master process: this file is not on the host (a container?), the pools below come from process titles only.
- A master process names this file, but it is outside the known PHP-FPM locations: not read (a process title can name any file).
- This account cannot read the file: pools unknown. and Not readable by this account:
<file>for included pool files.
Pool table (at most 200 pools per installation; more are counted as N more pools not shown):
| Column | Content |
|---|---|
| Pool | Pool name and the file it is defined in. |
| Account | user:group of the pool (not set when missing); workers run as … when ps shows other accounts. |
| listen | Socket path or address. |
| pm | static, dynamic or ondemand; under it start, spare min–max (dynamic), idle <process_idle_timeout> (ondemand), max_requests. |
| Workers / max_children | Worker processes from ps against pm.max_children (unknown / N when processes are not readable). |
| Timeouts, status | request_terminate_timeout, pm.status_path; not shown (unexpected characters) lists keys whose values were withheld. |
Warnings in the Workers / max_children cell:
| Text | Condition |
|---|---|
| ⚠ workers at pm.max_children (orange) | dynamic or ondemand pool with as many workers as pm.max_children. A static pool always has that many: static: always max_children. |
| ⚠ reached pm.max_children (N) K times in the last 2000 log lines (last (orange) | FPM’s own warning [pool <name>] server reached max_children setting (N) in the last 2000 lines of the error_log. |
| unverified: worker output is written undecorated to this log … | The pool has catch_workers_output = yes and decorate_workers_output = no: the application could have written a line that looks the same. |
Test config
Section titled “Test config”What it does, as the card says: parses php-fpm.conf and every included pool file and loads php.ini with its PHP extensions (no PHP script runs); opens (and may create) the error_log of the configuration as the session’s account; does not touch the running master.