httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandru Constantinescu <ald...@gmail.com>
Subject Re: [users@httpd] Load Increases due to Apache
Date Sun, 31 Aug 2008 16:04:26 GMT
Gaurav Pruthi wrote:
> I have also noticed kswapd daemon causing the load on server. What i 
> believe is that there is some website whose pages uses lot of memory. 
> Linux uses kswapd for virtual memory management such that pages that 
> have been recently accessed are kept in memory and less active pages are 
> paged out to disk. So,the kswapd process regularly decreases the ages of 
> unreferenced pages...and at the end they are paged out(moved out) to disk.
> 
> I am using Apache 2.6. My question is that is it possible to find out 
> which website or script causing this? I used apachetop and find a 
> website having lot of hits & consuming lot of bandwidth. After 
> suspending it, still the issue is there. Top command is showing only 
> httpd processes.
> 
> I have tried everything mentioned (mod_evasive,mod_cband,etc) but still 
> clueless. Is it possible in apache2 to run each website under different 
> userid? If yes then how it can be achieved? This will probably ease out 
> to find the culprit.
> 
> 
> Thanks,
> Gaurav Pruthi
> 
> On Fri, Aug 29, 2008 at 2:53 PM, Alexandru David Constantinescu 
> <aldavx@gmail.com <mailto:aldavx@gmail.com>> wrote:
> 
>     Gaurav Pruthi wrote:
> 
>         Hi Agnello,
> 
>         I am using prefork MPM
> 
>         <IfModule mpm_prefork_module>
>            StartServers         20
>            MinSpareServers      25
>            MaxSpareServers      50
>            MaxClients          500
>            MaxRequestsPerChild   0
>         </IfModule>
> 
> 
>         Thanks,
>         Gaurav
> 
> 
>         On Fri, Aug 29, 2008 at 1:30 PM, Agnello George
>         <agnello.dsouza@gmail.com <mailto:agnello.dsouza@gmail.com>
>         <mailto:agnello.dsouza@gmail.com
>         <mailto:agnello.dsouza@gmail.com>>> wrote:
> 
> 
> 
>            On 8/29/08, *Gaurav Pruthi* <gkpruthi@gmail.com
>         <mailto:gkpruthi@gmail.com>
>            <mailto:gkpruthi@gmail.com <mailto:gkpruthi@gmail.com>>> 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>
>         <http://www.linux-vashi.blogspot.com>
> 
>            www.bible-study-india.blogspot.com
>         <http://www.bible-study-india.blogspot.com>
>            <http://www.bible-study-india.blogspot.com>
> 
> 
> 
> 
>         -- 
>         Gaurav Pruthi
> 
> 
>     MaxClients          500 could be useless (I may be wrong but from
>     what I know is a hard coded limit in apache source code
>     HARD_SERVER_LIMIT who is set to 250 so if you want to raise that
>     limit you must recompile your apache)
> 
>     MaxRequestsPerChild   0 it say that once a child is created he can
>     stay up and running for infinite time. It could be better to limit
>     this , let say to 10000 in order to force apache to kill a stressed
>     child and start a fresh one.
> 
>     MinSpareServers      25 in my opinion is a little bit high.
>     Practically you force apache to keep free 25 servers any time. Try
>     to set this parameter to something like 10 or 15
> 
>     Ther is a lot of literature about those parameters and how is the
>     best way to set them bun ther is not a clear solutions so the best
>     practice is to start playing with them and look for what happen.
> 
> 
>     ---------------------------------------------------------------------
>     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: users-unsubscribe@httpd.apache.org
>     <mailto:users-unsubscribe@httpd.apache.org>
>      "   from the digest: users-digest-unsubscribe@httpd.apache.org
>     <mailto:users-digest-unsubscribe@httpd.apache.org>
>     For additional commands, e-mail: users-help@httpd.apache.org
>     <mailto:users-help@httpd.apache.org>
> 
> 
> 
> 
> -- 
> Gaurav Pruthi

If you wanna run each site on different uid (php point of view) , I 
think - suphp - is the best candidate for you. You will need php 
compiled as CGI.

Alexandru



---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message