PHP-FPM
acronymKept in this browser · My desk
Stands for: PHP FastCGI Process Manager
PHP's FastCGI Process Manager: a master process and pools of PHP workers that a web server reaches over FastCGI.
It is how NGINX runs PHP, and what the PHP manual now recommends behind Apache httpd's mod_proxy_fcgi instead of mod_php. Each pool has its own user, listen address and settings, and each worker serves one request at a time, so pm.max_children is the pool's concurrency limit. The manual warns that php-fpm must not be reachable from an untrusted network.
The process manager runs in one of three modes: static, a fixed number of workers; dynamic, a range of idle spares under a ceiling; ondemand, workers started when requests arrive and stopped when idle. pm.max_requests recycles a worker after a number of requests, and the status page (pm.status_path) shows the listen queue, the active and idle workers and whether the ceiling was ever reached.
The listen directive takes a TCP address or a Unix socket. The manual's warning on it is blunt: an exposed FastCGI endpoint allows arbitrary code execution, because a client that can open a FastCGI connection controls the configuration used for the request. On the same host it prefers a Unix socket; over TCP it calls for listen.allowed_clients, which accepts any address when unset. It also says pools are not a security mechanism, since all of them share one OPcache instance.
Also known as: fpm, fastcgi process manager, php-fpm pool, pm.max_children, php-fpm.conf
Sources
- PHP Manual, FastCGI Process Manager (FPM): features and "php-fpm must not be reachable from an untrusted network" (read 2026-10-27)
- PHP Manual, FPM configuration: listen and its warning, pm modes, pm.max_children, pm.max_requests, and "Pools are not a security mechanism" (read 2026-10-27)
- PHP Manual, FPM status page (read 2026-10-27)