Knowledgebase

How to Optimize PHP-FPM pm.max_children for High Traffic Print

  • 0

Prevent 502 errors and RAM exhaustion by tuning PHP-FPM worker limits.

Step-by-Step Instructions

  1. Measure average PHP-FPM worker RAM using ps.
  2. Set pm = dynamic with appropriate start_servers and max_children.
pm = dynamic
pm.max_children = 30
pm.start_servers = 4
pm.min_spare_servers = 3
pm.max_spare_servers = 10

Pro Tip: Restart php8.2-fpm after updating pool settings.

Need assistance? Open a ticket in the A1 Client Area or contact our 24/7 NOC Engineering Team on WhatsApp at +1 (406) 229-9597.


Was this answer helpful?

« Back