You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Ha...@hyperreal.org, Jeff <je...@wipd.com> on 1998/03/01 20:56:39 UTC

os-linux/1893: Server halts for apparently no reason

>Number:         1893
>Category:       os-linux
>Synopsis:       Server halts for apparently no reason
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Mar  1 13:10:00 PST 1998
>Last-Modified:
>Originator:     jeff@wipd.com
>Organization:
apache
>Release:        1.2.5
>Environment:
Linux wipd.com 2.0.33 #3 Fri Feb 20 06:25:31 MST 1998 i686 unknown
GCC 2.7.2.3
>Description:
I run a heavily-loaded web server, and everyone once in a while, the web server
will halt and not spawn any more, so I just have a script that restarts httpd
automatically.  Lately it has been happening every 20-30 minutes, and I have
been unable to find a solution so that the web server would be halting at all.
Here is an strace on the root httpd process when it is halted.

wait4(-1, NULL, WNOHANG, NULL)          = -1 ECHILD (No child processes)
nanosleep(0xbffffe34, 0xbffffe34, 0x400f8f94, 0xffffffff, 0x80b774c) = 0
wait4(-1, NULL, WNOHANG, NULL)          = -1 ECHILD (No child processes)
nanosleep(0xbffffe34, 0xbffffe34, 0x400f8f94, 0xffffffff, 0x80b774c) = 0
wait4(-1, NULL, WNOHANG, NULL)          = -1 ECHILD (No child processes)
nanosleep(0xbffffe34, 0xbffffe34, 0x400f8f94, 0xffffffff, 0x80b774c) = 0

Normally you will see getpid's and fork's when it is running properly, like this:

getpid()                                = 29028
fork()                                  = 29083
wait4(-1, NULL, WNOHANG, NULL)          = 0
nanosleep(0xbffffe34, 0xbffffe34, 0x400f8f94, 0xffffffff, 0x80b774c) = 0
getpid()                                = 29028
fork()                                  = 29087
wait4(-1, NULL, WNOHANG, NULL)          = 0
nanosleep(0xbffffe34, 0xbffffe34, 0x400f8f94, 0xffffffff, 0x80b774c) = 0
getpid()                                = 29028
fork()                                  = 29089
wait4(-1, NULL, WNOHANG, NULL)          = 0
nanosleep(0xbffffe34, 0xbffffe34, 0x400f8f94, 0xffffffff, 0x80b774c) = 0

I can't have it be doing this all the time obviously...
>How-To-Repeat:
Today, you will see my server on and off: www.wipd.com.  It gets to the 
'contacted www.wipd.com' part, but doesn't go on.
>Fix:
If it sees that there are no children, restart. Or if it sees that it is not
getpid'ing and fork'ing itself, restart (or start forking manually).
%0
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]