On Mon, Feb 01, 2010 at 03:07:26PM +0100, Conrad Wood wrote:
I'd say apache pid 27046 is waiting for IO after
it requested more
memory and the kernel trying to free some by utilising swap.
After 11 seconds (of doing IO) it complained.
_If_ my analysis is correct, you'd have the following Options:
* add more ram
* reduce amount of ram required
* increase IO Speed (new kernel/drivers/etc..)
* Reduce the footprint of Apache to fit in the RAM you've got.
If you're using the prefork MPM, the defaults are really quite
large for a busy site in limited space. For example, my home site (low
traffic, in the smallest Bitfolk VM) uses:
<IfModule mpm_prefork_module>
StartServers 2
MinSpareServers 1
MaxSpareServers 2
MaxClients 7
MaxRequestsPerChild 0
</IfModule>
What happens is, when you get spike in load (from a badly-written
spider, or a little light slashdotting), apache spawns more processes
to cope. This takes up RAM, and eventually pushes you into swap. Of
course, that then slows down the processing by several orders of
magnitude, ensuring that it falls even further behind, attempting to
spawn even more processes to keep up, and finally the system collapses
completely.
Bringing down the maximum number of processes that Apache will
consider serving so that they all fit in RAM prevents this from
happening.
You could also consider only loading the Apache modules you're
actually using, which saves yet more space.
Hugo.
--
=== Hugo Mills: hugo@... carfax.org.uk |
darksatanic.net | lug.org.uk ===
PGP key: 515C238D from
wwwkeys.eu.pgp.net or
http://www.carfax.org.uk
--- Great oxymorons of the world, no. 7: The Simple Truth ---