Help! any apache gurus out there ?

Danny Robert daniel.robert-HInyCGIudOg at public.gmane.org
Fri Jul 24 11:48:07 EDT 2009


Do you have the same experience when you disable KeepAlive altogether?

-Danny

ref wrote:
> Hi folks,
>
> I have a problem with apache/PHP config, and for hte life of me cant
> find a solution in google or on the apache website. Basically when
> apache spawns a child process, and the process completes its work, it is
> not dying. This means that in the timespan of maybe 20 minutes, my
> apache server hits MaxChildren and grinds to a shuddering halt.
> Restarting the server then resets it, and the cycle starts over. This is
> driving me crazy.
>
> For those who need full information, a more detailed description appears
> below.
>
> Servers :
> Distro : Centos 5.2 
> Kernel : 2.6.18-53.1.21.el5 #1 SMP Tue May 20 09:34:18 EDT 2008 i686
> i686 i386 GNU/Linux
> apache version : Apache/2.2.3 (CentOS)
> php version : 5.2.6
>
> while watching the server-status page from the server, it appears that
> most of the processes are in state 'w' : "W" Sending Reply,
>
> 3.61 requests/sec - 12.2 kB/second - 3450 B/request
> 61 requests currently being processed, 5 idle workers
> KWWW.WWWWWWW_WWWWW_WWW_WWWWWWWWWW.WWW.WWWWWWWWWWWWWWW.WWWWW_WWK.
> W..W.KKW_..W....................................................
> ................................................................
> ................................................................
>
>
> then a short time later ....
> 3.54 requests/sec - 12.4 kB/second - 3581 B/request
> 99 requests currently being processed, 5 idle workers
> KWKWWWWWWWKWWWWKWWWWKWWWWWWWWWWWWWWWWWWWWWWWWWKWWWWWWWWWWWWWWWWW
> KWWWWWKWWWKWWWWWWWWWW_KWWWWWKKWKWKWK____........................
> ................................................................
> ................................................................
>
> as you can see, the requests per second went down, but the number of
> processes in wait state went up. 
> Obviously this is a bad thing
> can anyone help me here, or even point me in the right direction ?
>
> I am running apache-prefork with the following conf snips :
> <IfModule prefork.c>
> StartServers       10
> MinSpareServers    5
> MaxSpareServers   10
> ServerLimit      256
> MaxClients       256
> MaxRequestsPerChild  15
> </IfModule>
>
> I have also set the apache timeout to 20 seconds, and the keepalive
> timeout to 2 seconds. However,I have a process that has been alive for
> 1759 seconds. Even the PHP timeout is set to 15 seconds. 
> I have even gone as far as setting /proc/sys/net/ipv4/tcp_fin_timout to
> 5 seconds in an extreme attempt to get things to play nice ... nothing
> seems to be working and I am getting short on heair to pull out ...
>
>
> thanks for anything :)
>
> Richard
>   






More information about the Discuss mailing list