Apache outages that I don't understand
On about a daily basis my LAMP site goes down for some minutes. This keeps happening for a long time but I've never looked into it deeply enough until now.
Currently multiple site monitoring services are set up for
Also, on monda.hu I run a script containing:
(free; ps_mem.py; ping -c 1 google.com) > date +%Y-%m-%d_%H:%M
.log
on a per-minute basis to be able to see whether there's any network connectivity issues or whether trashing may happen.
The problem is that I cannot see anything that'd explain why this keeps happening. I'm suspicious regarding trashing but cannot see any sign of it. In the Linode Manager there are no spikes and according ps_mem.py (which is a ps-like smaps based tool) I should have enough free memory (memory usage seem to be always below 300MiB of about 435).
What could be the cause then?
Thanks in advance.
Laci
3 Replies
I don't know what statistics ps_mem.py collects. If it doesn't track CPU usage, then adding vmstat 1 2 to your monda.hu script may be helpful. The first line of data will represent system activity since the last reboot, and the next line will be activity for the current second.
root@linode:/etc/apache2# apache2ctl -l
Compiled in modules:
core.c
modlogconfig.c
mod_logio.c
prefork.c
http_core.c
mod_so.c
This suggests me that I'm using the prefork MPM module.
As for the MaxClients and related settings:
MinSpareServers 3
MaxSpareServers 6
MaxClients 5
ServerLimit 5
MaxRequestsPerChild 300
I've been experimenting with various values a while ago and this produced the best results.
@Vance:
Generally these problems occur once or twice per day but I couldn't observe any specific patterns. I don't think that it's a cronjob because I could see that in the output of ps_mem.py
I've just added vmstat 1 2
to my script, thanks for the suggestion.