Every PHP request runs in a worker. The number of workers (pm.max_children) is how many uncached requests an application can answer at the same time.
A simple rule
Workers × memory per request must fit in the memory left after MariaDB, Redis, OpenSearch and the system. A Magento request typically uses 100 to 300 MB; a WordPress request 50 to 150 MB.
| Server memory | Typical Magento workers | Typical WordPress workers |
|---|---|---|
| 8 GB | 8 to 12 | 15 to 25 |
| 16 GB | 16 to 24 | 30 to 40 |
| 32 GB | 30 to 45 | 50 to 70 |
More workers than the memory can hold makes the server swap. Everything slows down at once. If the Memory graph is always full, lower the workers or add Varnish rather than raising them.
Symptoms of too few workers
502or504errors during peaks while CPU is not full.server reached pm.max_childrenin the PHP error log.
Varnish and the browser check reduce the number of requests that need a worker at all. They are often a better answer than more workers.
Did this solve it? If not, tell us what you see and we look at your server.
Open a ticket