Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jan 21, 2012 8:06 am 
Offline
Newbie

Joined: Tue Mar 02, 2010 8:47 pm
Posts: 2
Website: http://monda.hu
Hi guys,

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 http://monda.hu and I get alerts on a daily basis. There's another Linode in the same datacenter from which I curl http://monda.hu/ on a per minute basis to see for myself whether it's alive. These curl logs confirm the alerts of the site monitoring services that are set up.

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


Top
   
 Post subject:
PostPosted: Sat Jan 21, 2012 11:27 am 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
Are you using prefork in apache and is your MaxClients set at the default? This is the cause of like 90% of the OOM errors people have here.


Top
   
 Post subject:
PostPosted: Sat Jan 21, 2012 9:50 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Is there any pattern to the time of day that problems occur? If so, it could be a CPU- or I/O-hungry cron job interfering with the web server.

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.


Top
   
 Post subject:
PostPosted: Tue Jan 24, 2012 1:59 pm 
Offline
Newbie

Joined: Tue Mar 02, 2010 8:47 pm
Posts: 2
Website: http://monda.hu
@gig:

root@linode:/etc/apache2# apache2ctl -l
Compiled in modules:
core.c
mod_log_config.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:

<IfModule mpm_prefork_module>
StartServers 1
MinSpareServers 3
MaxSpareServers 6
MaxClients 5
ServerLimit 5
MaxRequestsPerChild 300
</IfModule>

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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group