Agnello George wrote:


On 8/29/08, *Gaurav Pruthi* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Dear Friends,

    I am facing very strange problem. I have a LAMP server. It has
    around 400 of websites hosted on it. Since last one month the server
    load increases suddenly. When checked using top command, i saw
    apache process consuming 99% of CPU. After i kill httpd and starts
    it again (or using HUP), load comes down to the normal. It happens
    8-10 times each day. I am unable to find what could cause the apache
    to consume all the resources of server and causing server to hang.

    Kindly help me to resolve this issue.

Could you tell us the Server-Pool Size Regulation mentioned in the httpd.conf --
Regards
Agnello D'souza
www.linux-vashi.blogspot.com <http://www.linux-vashi.blogspot.com>
www.bible-study-india.blogspot.com <http://www.bible-study-india.blogspot.com>


The cause for this load could be explained in many ways.
1. Poor scripts
Look in error_log or php_error.log for something suspicious
2. Increase of visitors (the holiday is off)
I'm use to such increase of traffic in this month
3. Attacks
Look for suspicious connections. A ps -ax|grep -c httpd could tell you how many apache child are running. If you rich the max number of clients it could be a problem.
Try
netstat -ntu | grep SYN_RECV | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr to see how many connections you have/ip Apachetop could be a better tool for analyzing the apache load. you can see the top requested files/sites

It can also be e matter of suddenly increase the number off visitors versus the ability of the apache server to provide requested child processes. For this matter look for the configuration options

KeepAliveTimeout
MinSpareServers
MaxSpareServers
StartServers
MaxClients
MaxRequestsPerChild

Also it could be a good ideea to limit the traffic. You can try mod_evasive, mod_gzip, mod_expires, etc

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to