I've been running the Apache HTTP server benchmarking tool (ab) on my new Apache server to test performance. I noticed that with a command like the following:
ab -n 100000 -c 1000 http://www.mysite.com/
The CPU is used 100% by the apache2 processes during the testing. When the test concludes, usually with the following error just before the last requests are made:
apr_poll: The timeout specified has expired (70007)
Total of 99960 requests completed
the CPU usage remains at 100%, and it's all being consumed by apache.
I am using the worker MPM with and running PHP with mod_fcgid.
Any advice as to why this is or what can be done to stop it would be appreciated.
Best Answer
After some more digging, I tried disabling some modules. It turns out the issue went away and the benchmarking was a lot faster when I disabled mod_pagespeed. I found out that mod_pagespeed isn't optimised for the worker MPM. I'll take a look & see if there's any obvious problems with the pagespeed configuration that can be fixed, otherwise I'll have to remove it.