'FPM Processes taking HIGH CPU UTILIZATION for concurrent requests
We are running an application on nginx and fpm. The problem that we are facing is, there is a page where in there are more than 50 ajax request to server which calls apis(curl request) within. During these concurrent request we have observed that CPU and memory utilization goes upto 100% which affects other requests.Our application is running on php.(codeigniter). Also we have observed in chrome that request go in pending mode and give response after a min. But when these request are hit individually they immediately give response. What could be the reason for this?
enter image description here
Server configuration 2 CPU 4GB RAM.
We have tried below solutions.
1.Removing sessions
2.Optimising Nginx and fpm configurations.
3.Using Http2 protocol.`
Below is PHP-FPM configuration
pm = dynamic
pm.max_children = 75
pm.start_servers = 10
pm.min_spare_servers = 10
pm.max_spare_servers = 20
We were expecting the page to load without any delay, But due to concurrent request, CPU UTILIZATION has increased which is causing delay.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
