Systems Tuning
Per-Site PHP-FPM Tuning: pm.ondemand vs pm.dynamic vs pm.static
Calculate exact pm.max_children ceilings and idle timeouts across 5 to 40 tenants so idle brochure sites free RAM for busy WooCommerce checkouts.
ondemand: -67% Idle RAM · dynamic: Zero Fork Lag on Cart POST
Mixing ondemand and dynamic Pools on One Server
CloudPanel writes an independent pool file per site under /etc/php/8.3/fpm/pool.d/. Keep 18 quieter agency sites on pm=ondemand while setting your 2 revenue-critical WooCommerce stores to pm=dynamic with 2 warm minimum servers.
Setting pm.max_requests to Stop Memory Creep
Third-party WordPress plugins and PDF generators occasionally leak memory across requests. Setting pm.max_requests = 500 gracefully respawns each worker after 500 executions before RSS balloons.
Measured Parameters & CloudPanel Stack Directives
| Pool Parameter | Agency Brochure Sites | Active WooCommerce / API |
|---|---|---|
| pm Mode | pm = ondemand | pm = dynamic |
| pm.max_children | 6 to 10 per tenant | 12 to 20 per tenant (capped to RAM) |
| pm.process_idle_timeout | 10s (reaps idle workers fast) | N/A (uses min_spare_servers = 2) |
| pm.max_requests | 500 (recycles leaky extensions) | 500 (prevents slow PHP RSS creep) |