You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by mark redding <mw...@gmail.com> on 2007/09/10 11:38:17 UTC

[users@httpd] Intermittent Unresponsiveness of Apache

Hi all,

For the past 5 weeks now I've been experiencing an intermittent problem with
Apache 1.3.37. The server simply stops serving pages and remains in an
unresponsive state until I issue an "apachectl restart" after which it
returns to normal operation. I can find no pattern to this, as at times the
server will function normally for many days and at other times it will
become unresponsive twice a day. I have tried looking into the error log and
access log files, however the error log contains no information that is of
use (it only contains "file not found" and "process restart" type messages),
as the site is very busy (it has served 800,000 pages/images in the last two
days (totally 5.8GB) I have been unable to find a pattern in the access log
file that may point to any particular page or php script that may be causing
a problem).

Prior to August (when the problem first surfaced) the server did not exhibit
the problem, yet NO apache/kernel/userland software upgrade have taken place
since the server was build back in February. My best guess is that either a
php script is causing the problem, or that some security hole is
infrequently being exploited to generate a DOS. I have tracked back through
the code releases on the site and last change prior to the problem surfacing
was fully 7 days prior to it.


The server is running RedHat Linux :-

Red Hat Enterprise Linux ES release 4 (Nahant Update 4)

Linux web02 2.6.9-42.0.10.ELsmp #1 SMP Fri Feb 16 17:17:21 EST 2007 i686
i686 i386 GNU/Linux


with Apache :-

Server version: Apache/1.3.37 (Unix)
Server built:   Feb 21 2007 11:33:58


And uses (amongst others) :-

LoadModule php4_module        libexec/libphp4.so


The main configuration file changes from the norm are :-

KeepAlive On
MaxKeepAliveRequests 128
KeepAliveTimeout 8
MinSpareServers 40
MaxSpareServers 80
StartServers 64
MaxClients 128
MaxRequestsPerChild 128
ExtendedStatus On

Listen 8044


The 'rather old' version of PHP I am using is :-

PHP 4.4.2 (cli) (built: May  2 2007 10:28:50)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by Zend
Technologies
    with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend
Technologies



The server itself, a Dell PowerEdge 1950 with 2GB of memory and 2 dual core
2.33GHz Xeon processors, is not CPU bound (the load average does not exceed
0.6) nor it is starved of memory.


Any ideas as to where I should look next to try to resolve this would be
most appreciated ?

-- 
bright blessings,
Mark

Re: [users@httpd] Intermittent Unresponsiveness of Apache

Posted by mark redding <mw...@gmail.com>.
Hi,

> I suppose you can't get to the server-status page when this is happening?


Yes, that is correct...no response is returned when I make this request.

> http://httpd.apache.org/dev/debugging.html#backtrace
>

Thank you for the pointer. I'll script up something to ptrace the
apache processes when they get 'stuck'.

-- 
bright blessings,
Mark

---------------------------------------------------------------------
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] Intermittent Unresponsiveness of Apache

Posted by Joshua Slive <jo...@slive.ca>.
On 9/10/07, mark redding <mw...@gmail.com> wrote:

> Any ideas as to where I should look next to try to resolve this would be
> most appreciated ?

I suppose you can't get to the server-status page when this is happening?

The only real way to debug a problem like this, as far as I know, is
to locate an apache process that is "frozen" (should be serving new
connections, but isn't) and attach to it with a debugger to see where
it is locked up. Some info on how to do this is at
http://httpd.apache.org/dev/debugging.html#backtrace

Joshua.

---------------------------------------------------------------------
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] Fwd: Intermittent Unresponsiveness of Apache

Posted by mark redding <mw...@gmail.com>.
The behaviour seems to be a little different to that which I described
below. I have checked back through the log file for the time of the last
occurence and can see that already established connections (I presume
because of KeepAlive being switched on) continue to be served (for example,
I have a script that refreshes every 5 seconds and this continued to be
served) whereas new connections are not responded to.

I believe I have ruled out external network sources for the problem as a
"wget http://localhost:8044" does not receive a response when apache is in
this state.

regards,
Mark

---------- Forwarded message ----------
From: mark redding <mw...@gmail.com>
Date: 10 Sep 2007 10:38
Subject: Intermittent Unresponsiveness of Apache
To: users@httpd.apache.org

Hi all,

For the past 5 weeks now I've been experiencing an intermittent problem with
Apache 1.3.37. The server simply stops serving pages and remains in an
unresponsive state until I issue an "apachectl restart" after which it
returns to normal operation. I can find no pattern to this, as at times the
server will function normally for many days and at other times it will
become unresponsive twice a day. I have tried looking into the error log and
access log files, however the error log contains no information that is of
use (it only contains "file not found" and "process restart" type messages),
as the site is very busy (it has served 800,000 pages/images in the last two
days (totally 5.8GB) I have been unable to find a pattern in the access log
file that may point to any particular page or php script that may be causing
a problem).

Prior to August (when the problem first surfaced) the server did not exhibit
the problem, yet NO apache/kernel/userland software upgrade have taken place
since the server was build back in February. My best guess is that either a
php script is causing the problem, or that some security hole is
infrequently being exploited to generate a DOS. I have tracked back through
the code releases on the site and last change prior to the problem surfacing
was fully 7 days prior to it.


The server is running RedHat Linux :-

Red Hat Enterprise Linux ES release 4 (Nahant Update 4)

Linux web02 2.6.9-42.0.10.ELsmp #1 SMP Fri Feb 16 17:17:21 EST 2007 i686
i686 i386 GNU/Linux


with Apache :-

Server version: Apache/1.3.37 (Unix)
Server built:   Feb 21 2007 11:33:58


And uses (amongst others) :-

LoadModule php4_module        libexec/libphp4.so


The main configuration file changes from the norm are :-

KeepAlive On
MaxKeepAliveRequests 128
KeepAliveTimeout 8
MinSpareServers 40
MaxSpareServers 80
StartServers 64
MaxClients 128
MaxRequestsPerChild 128
ExtendedStatus On

Listen 8044


The 'rather old' version of PHP I am using is :-

PHP 4.4.2 (cli) (built: May  2 2007 10:28:50)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by Zend
Technologies
    with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend
Technologies



The server itself, a Dell PowerEdge 1950 with 2GB of memory and 2 dual core
2.33GHz Xeon processors, is not CPU bound (the load average does not exceed
0.6) nor it is starved of memory.


Any ideas as to where I should look next to try to resolve this would be
most appreciated ?

-- 
bright blessings,
Mark



-- 
bright blessings,
Mark