So there’s this server I “look after”. Last night I got a call to tell me it was being slow, and would I take a look at it.
At the time Apache + MySQL were both going wild, and the box was dying hard. As it’s a virtual machine with only 128Mb of memory it was having a terrible time coping. Most obviously /tmp was full and there were swapping processes all over the place.
I patched it up, dropped a few machines who were trying to attack it with a PHPBB security exploit via the firewall and went to bed.
This morning?machinima:/var/log/apache# ps -ef |grep apache | wc -l 156 machinima:/var/log/apache# ps -ef |grep mysql | wc -l 364 machinima:/var/log/apache# uptime 09:32:30 up 6:44, 1 user, load average: 23.28, 23.16, 23.56
Look at that – 156 Apache processes. 364 MySQL processes and the kind of load you could fry your breakfast on.
Seems to be humming along service pages slowly, so I’m going to leave it alone for the moment.
I’ve suggested the owners of the machine increase the memory and then consider moving the database + webservers onto seperate machines to make things more controlled in the future.