How does PHP-FPM work, and what are the advantages of using it over the older mod_php?
Last updated
PHP-FPM(FastCGI Process Manager) runs a master process managing a pool of worker processes. The web server forwards requests over FastCGI to a free worker, tuned via directives likepm.max_children.Advantages over
mod_php: works with any server (includingNginx), lower memory, and separate pools per user/config for isolation.Workers can be recycled with
pm.max_requeststo contain memory leaks.mod_phpwas simpler but tied PHP to Apache's prefork model and bloated memory.
- https://en.wikipedia.org/wiki/PHP
- https://lemon.io/for-developers/php-developer-jobs/
- https://lan-portal.uob.edu.ly/visit/BOOK/529X432U02/modern-php_new__features_and_good-practices.pdf
- https://lan-portal.uob.edu.ly/upload/MD/D57953S372/modern-php__new_features_and__good__practices.pdf
- https://news.ycombinator.com/item?id=30786927
- https://kvnc-inc.medium.com/solid-principles-in-php-1c41069e9af6
- https://www.shkodenko.com/
- https://confoo.ca/en/2024/sessions