--- title: What Is PHP-FPM? PHP Workers, Configuration, and Performance description: "PHP-FPM executes PHP through a pool of workers ready to serve requests. Here's how the pool works, what worker limits mean, and how they hit performance." canonical: https://penasihathosting.com/en/hosting-wiki/php-fpm type: wiki locale: en updated: 2026-09-29 author: Willya Randika --- # What Is PHP-FPM? PHP Workers, Configuration, and Performance ## Overview - **Summary:** PHP-FPM executes PHP through a pool of workers ready to serve requests. Here's how the pool works, what worker limits mean, and how they hit performance. - **Author:** Willya Randika ([profile](/penulis/willya-randika)) ## Article ## What Is PHP-FPM? PHP-FPM (FastCGI Process Manager) is the program that executes [PHP](/en/hosting-wiki/php) code and serves it over FastCGI to a web server like Nginx or Apache. When a visitor requests a WordPress page, the web server doesn't run PHP itself — it hands that job to PHP-FPM. The easiest mental model: PHP-FPM is a **pool of workers**. A number of workers are alive and waiting. A request arrives, one worker grabs it, does the work, then returns to standby. 💡 A Simple Analogy: Think of a convenience store's cashiers. The manager decides how many registers are open: three during quiet hours, ten during the rush. Customers are served by whichever cashier is free. If every register is busy and the queue line is full, new customers simply can't be served — exactly what happens when PHP-FPM workers run out. ## How PHP-FPM Works The request chain looks like this: 1. The web server receives a request for a dynamic page. 2. It forwards the request over FastCGI to PHP-FPM. 3. The PHP-FPM master process hands it to a free worker from the pool. 4. The worker executes the PHP script — calling plugins, querying the database, assembling HTML. 5. The result travels back through the web server to the browser. The worker returns to the pool. The pool configuration defines the behavior. **Dynamic** mode grows and shrinks the worker count with load. **Static** mode keeps a fixed number of workers alive. **Ondemand** mode spins workers up only when needed — a reasonable fit for tiny, rarely-hit servers. ## Worker Counts and Your Hosting Plan Every PHP-FPM worker consumes memory — typically tens to a few hundred MB depending on the application. That means your worker ceiling is set by your RAM, not your ambition. A 1 GB [VPS](/en/vps-hosting) fits only a handful of active workers; once concurrent visitors exceed that, requests start queueing. This connects directly to the **entry processes** limit on shared hosting ([explained here](/en/hosting-wiki/entry-processes-ep)). Many providers cap how many PHP processes may run at once per account. A site that crawls at peak hours but flies when quiet almost always brushes against this limit. On an [unmanaged VPS](/en/unmanaged-vps), `pm.max_children` becomes the most critical setting: too low creates queues, too high exhausts RAM and pushes the server into swap. ## Common Mistakes and Tips **Raising max_children as high as possible.** Unlimited workers just move the problem from CPU to memory. A RAM-starved server starts swapping — and swapping makes the site far slower than a short queue would. Size the pool from available memory, not from a big number. **Leaving defaults untouched on small servers.** Stock configuration often targets dedicated hardware. On a 1 GB VPS you should usually reduce the worker count, not keep the factory values. **Blaming PHP-FPM for a database problem.** When traffic spikes, the jam may be MySQL unable to serve many parallel connections, not the workers. Check both before concluding. **Changing config without reloading.** Pool file edits only take effect after PHP-FPM is reloaded or restarted. Editing without reloading is why people assume "the setting doesn't work." ## FAQs ### Does shared hosting use PHP-FPM? Usually yes, behind the scenes — commonly with Nginx, or LiteSpeed as an alternative. You don't manage it, but the per-account process limit in your plan is essentially your share of a PHP-FPM pool. ### How many workers do I need? Estimate from the memory side: available RAM for PHP divided by average per-worker usage. A WordPress site with 2 GB of RAM typically handles a pool of a dozen or so workers, if MySQL gets its share too. ### What are the signs PHP-FPM is the bottleneck? A "server reached pm.max_children setting" notice in the logs, or an [error 503](/en/hosting-wiki/error-503) during traffic spikes while CPU and RAM still look fine. Both point to exhausted workers. ### Does LiteSpeed replace PHP-FPM? LiteSpeed uses its own mechanism (LSAPI) that serves a similar role. From a site owner's perspective the concept is the same: a cap on parallel PHP processes, set by your plan.