apache 1.3.3 hangs; unable to kill children

apache 1.3.3 hangs; unable to kill children

Post by Marc Slemk » Thu, 12 Nov 1998 04:00:00




>[ posted to comp.infosystems.www.servers.unix, alpha-osf-managers,
>redhat-list ]
>Digital Unix 4.0B (problem may not be exclusive to DU)
>Apache 1.3.3
>Apache hangs, browsers receive no response for over 2 minutes or more.
>Can only kill the root httpd process, unable to kill children:  kill -9 PID
>completes without errors, but the processes do not die.  Trying to page
>the access_log freezes the terminal session, unable to kill 'tail' or 'less'
>that is used to look at the log.
>'ps auwx' returns all httpd and relevant tail processes marked as 'U' -
>uninterruptable sleeping process.  i am not sure if this is at all relevant
>to the problem described above.

Are you using NFS?

If so, do you have a LockFile directive pointing to a local drive?

 
 
 

1. Killing a child process if it hangs

I have a script which spawns some 20-100 child processes which run
scripts on remote systems. Sometimes, some of the children hang
(e.g. because of NFS/network problems). Moreover, I must check
400 hosts with 5-20 at a time.

What I need is a way to wait for a certain time (say 2 minutes)
and then kill the hanging children (and all child processes) with -9
(okokok... with kill ; sleep ; kill -9 >2 /dev/null :-).

My first solution was this:

    child | sleep 120 &

that effectively kills the child but not its children (and it has
the minor problem that I have lots of sleeps idling around).

Something like

    run work child
    run timeout child

and whichever finishes first kills the other away but how do I tell
the work child the PID of the timeout child ? I could write the
PIDs in temporary files but what if the FS is full ? and how about
races ?

--
Dipl. Inf. (FH) Aaron "Optimizer" Digulla
"(to) optimize: Make a program faster by
improving the algorithms rather than by
buying a faster machine."

Sent via Deja.com http://www.deja.com/
Before you buy.

2. in2000 SCSI drivers crashes using HD intensively

3. kill child and its all grad child processes?

4. The Eagle Has Landed

5. how to kill a child process that runs other children processes

6. Win95 -> Linux assistance

7. Unable to kill hung processes

8. Lost a lib file. Please Help!

9. killing a shell script is not killing child processes

10. Apache 1.0.5: Killing Child Processes

11. Does killing parent kill children?

12. How can kill all child processes without killing parent process ?

13. Apache v1.1.1 not always killing child processes