Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Optimal MPM and PHP-FPM set up for many concurrent users
We are having trouble with our server and many concurrent users. We want to support at least 4000 concurrent users.
Our server has 32 cores and 192GB of RAM, which should be enough. We run MPM_event with PHP-FMP
pm = static pm.max_children = 4800
<IfModule mpm_event_module> ServerLimit 100 StartServers 16 MinSpareThreads 50 MaxSpareThreads 300 ThreadsPerChild 50 ThreadLimit 64 MaxClients 3000 MaxRequestsPerChild 0 MaxConnectionsPerChild 8000 </IfModule>
We tried to fine tune this settings but without success. After ~400 (not 4000) concurrent users the website slows down and become unresponsive. Any suggestion on how to improve?
By looking at “top” on average an Apache process and PHP-FPM process are 40MB.
When the website become unresponsive only 30GB out of 192GB of RAM are used.
What other configuration might slow everything down?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×