So I've spent the last two days trying to figure this out. We host a pretty high-traffic Magento site on Amazon EC2 Large, using both Apache w/mpm-prefork, Varnish, and APC caching. Problem is the CPUs suddenly spike at 100% and never quits, increasing the load and rendering the page unusable. This happens every time Apache is started, though usually after several minutes.
First som server stats:
- Processor: 64-bit
- vCPU: 2
- Memory (GiB): 7.5
For now, our only remedy has been to upgrade the instance to XLarge where it performs "ok" (load average on 0.6 - 0.9 but still usable). Still, based on other sites, a Large instance should be enough to host this with relatively good performance.
I suspect that our prefork settings may be causing this. On the Large instance, we have the following settings:
<IfModule mpm_prefork_module>
StartServers 10
MinSpareServers 10
MaxSpareServers 20
ServerLimit 50
MaxClients 50
MaxRequestsPerChild 4000
</IfModule>
Timeout 120
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 5
When upgrading to XLarge, we swap with some higher prefork-settings:
<IfModule mpm_prefork_module>
StartServers 20
MinSpareServers 20
MaxSpareServers 40
ServerLimit 150
MaxClients 150
MaxRequestsPerChild 8000
</IfModule>
Does anyone have any ideas that I might look into? Or anyone with a similar setup willing to share?
Any help is appreciated!