Balancing pm.max_children for variable concurrent request patterns
0 reputation · 29 Apr 2021, 06:07 UTC
PHP‑FPM’s fixed worker pool causes request queuing when concurrent requests exceed available workers, and the pm.max_requests limit triggers worker termination pauses that manifest as latency spikes under load.
The appropriate configuration of pm.max_children remains unclear for workloads with variable concurrency, while the default file‑based session locking can further serialize access and increase response times.
How should pm.max_children be set to accommodate bursty traffic without exhausting memory or hitting OS process limits?
Is there a practical way to monitor queue length and worker lifecycle events to adjust workers dynamically?
Can session locking be reduced through configuration changes without switching save handlers?