Stack Matrix Hub (11)
Isolated PHP-FPM Pools per Client Account (350-550 MB)
Prevent one client plugin loop from starving 49 sibling websites using per-user pm = ondemand pools and strict pm.max_children ceilings.
pm = ondemand · 0 MB idle RSS · 4-8 max_children/site
Why Shared PHP-FPM Pools Collapse at 30+ Client Sites
Running 50 WordPress domains inside a single www-data PHP-FPM pool creates two failures: cross-site filesystem read access if one outdated plugin is compromised, and worker starvation when one WooCommerce flash sale consumes all available PHP children.
pm = ondemand Keeps Idle Client Memory Near Zero
Using pm = ondemand with pm.process_idle_timeout = 10s spawns PHP-FPM workers only when an uncached request arrives (wp-admin, checkout, REST). Capping pm.max_children = 4 for brochure SMBs and 8 for WooCommerce sites isolates burst memory cleanly.
Measured Density & Margin Thresholds
| Client Site Class | pm Mode | pm.max_children | Active RAM Envelope |
|---|---|---|---|
| Brochure SMB Site | ondemand (10s idle) | 4 children | ~350 MB allocated / 60 MB active |
| Low/Med WooCommerce | ondemand (15s idle) | 8 children | ~520-550 MB allocated / 180 MB active |
| High-Admin Agency Portal | dynamic (2 min) | 10 children | ~640 MB allocated |