You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Timothy Martin <in...@me.com> on 2009/08/12 02:14:08 UTC
[users@httpd] guidance on how to track down crazy apache processes
I've googled until the cows came home, but I can't for the life of me
find a good method to figure out what's going on with my server. Help/
Input on what's happening given my description below would be great,
but honestly I'm just looking for a method to figure it out on my own!
What's happening:
As far as I can tell, i get some moderate rapid requests from some
malware/spiders/crawlers/etc which is of course undesirable, but we're
only talking about 175 requests a second. Most of the requests are for
php documents, wordpress in particular. If i take down the wordpress
site the problem does appear to stop, but it's not clear if it's
because of PHP or simply that once the requested urls are no longer
present the server load is obviously less.
Anyway, despite having the prefork mpm set with a limit of 6, my
watchdog process (monit) will report process count shooting up over
50. I can't figure out how apache is letting itself get so many
processes spinning out of control. Monit then restarts the server and
everything is fine again until the next surge of page requests.
The setup:
Slicehost XEN-based VPS
Gentoo Linux 2.6.24-23-xen x86_64 Dual-Core AMD Opteron(tm) Processor
Apache 2.2.11
apr 1.3.8
apr-util 1.3.9
php 5.2.10
mysql 5.0.70
misc other unimportant things
my Prefork MPM is setup as such:
StartServers 3
MinSpareServers 3
MaxSpareServers 6
MaxClients 80
MaxRequestsPerChild 2500
I'd be happy to make more of my configs or any kind of debug output
available if someone could point me in a direction that made sense.
.tim
---------------------------------------------------------------------
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
Re: [users@httpd] Re: guidance on how to track down crazy apache
processes
Posted by Arnab Ganguly <ag...@gmail.com>.
Try using the worker model. You can limit the process with multiple threads.
Thanks
Arnab
On Wed, Aug 12, 2009 at 2:10 PM, Nicholas Sherlock <n....@gmail.com>wrote:
> Timothy Martin wrote:
>
>> Anyway, despite having the prefork mpm set with a limit of 6, my watchdog
>> process (monit) will report process count shooting up over 50. I can't
>> figure out how apache is letting itself get so many processes spinning out
>> of control. Monit then restarts the server and everything is fine again
>> until the next surge of page requests.
>>
>> my Prefork MPM is setup as such:
>> StartServers 3
>> MinSpareServers 3
>> MaxSpareServers 6
>> MaxClients 80
>> MaxRequestsPerChild 2500
>>
>
> MaxSpareServers is the maximum number of *spare* servers, that is, servers
> that are not serving clients but are instead sitting there doing nothing.
> MaxClients is the parameter which controls the maximum number of (busy or
> idle) Apache processes.
>
> Cheers,
> Nicholas Sherlock
>
>
> ---------------------------------------------------------------------
> 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
>
>
[users@httpd] Re: guidance on how to track down crazy apache processes
Posted by Nicholas Sherlock <n....@gmail.com>.
Timothy Martin wrote:
> Anyway, despite having the prefork mpm set with a limit of 6, my
> watchdog process (monit) will report process count shooting up over 50.
> I can't figure out how apache is letting itself get so many processes
> spinning out of control. Monit then restarts the server and everything
> is fine again until the next surge of page requests.
>
> my Prefork MPM is setup as such:
> StartServers 3
> MinSpareServers 3
> MaxSpareServers 6
> MaxClients 80
> MaxRequestsPerChild 2500
MaxSpareServers is the maximum number of *spare* servers, that is,
servers that are not serving clients but are instead sitting there doing
nothing. MaxClients is the parameter which controls the maximum number
of (busy or idle) Apache processes.
Cheers,
Nicholas Sherlock
---------------------------------------------------------------------
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