Stack Matrix Hub (8)
Sizing PHP-FPM pm.max_children for PrestaShop Checkout Bursts
Calculate exact pm.max_children ceilings from 6 to 120 workers without Linux OOM kills or 502 gateway queues.
6-120 workers · pm = dynamic · max_requests = 500
Exact Memory Ceiling Equation for PHP-FPM
Never size pm.max_children by guesswork. Subtract MariaDB innodb_buffer_pool_size, Varnish/Redis cache memory, and 512 MB OS headroom from total host RAM, then divide the remainder by your measured PrestaShop per-worker RSS (160-290 MB).
Recycling Long-Lived Workers with pm.max_requests
Third-party payment and shipping modules occasionally leak memory across requests. Setting pm.max_requests = 500 gracefully respawns PHP-FPM children before RSS fragmentation erodes your MariaDB buffer headroom.
Measured Thresholds & Configuration
| Host RAM | Reserved DB + Cache + OS | Available PHP Pool | Safe pm.max_children |
|---|---|---|---|
| 3 GB (ChemiCloud Turbo) | 1.15 GB | 1.85 GB | 8-11 workers |
| 8 GB (ChemiCloud VPS) | 2.9 GB | 5.1 GB | 22-28 workers |
| 16 GB (Hostinger KVM 4) | 5.3 GB | 10.7 GB | 44-58 workers |
| 32 GB (Hostinger KVM 8) | 9.5 GB | 22.5 GB | 88-120 workers |