one apache process looping

one apache process looping

Post by rc » Thu, 03 Jul 2003 19:35:34



Hi,

We have one apache process that is constantly starting after apache
restart.
this process takes sometimes 99% or cpu, and sometimes just 15%.

when I try to strace it, I get:

--- SIGSTOP (Stopped (signal)) ---
select(0, NULL, NULL, NULL, {0, 742140}) = 0 (Timeout)
time(NULL)                              = 1057141901
kill(10344, SIGUSR1)                    = 0
wait4(-1, 0xbffff88c, WNOHANG, NULL)    = 0
select(0, NULL, NULL, NULL, {1, 0})     = ? ERESTARTNOHAND (To be
restarted)
--- SIGCHLD (Child exited) ---
select(0, NULL, NULL, NULL, {0, 996030}) = 0 (Timeout)
time(NULL)                              = 1057141902
kill(10345, SIGUSR1)                    = 0
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG, NULL) =
10344
wait4(-1, 0xbffff88c, WNOHANG, NULL)    = 0
select(0, NULL, NULL, NULL, {1, 0})     = ? ERESTARTNOHAND (To be
restarted)
--- SIGCHLD (Child exited) ---
select(0, NULL, NULL, NULL, {0, 996030}) = 0 (Timeout)
time(NULL)                              = 1057141903
kill(10345, SIGUSR1)                    = 0
wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG, NULL) =
10345
wait4(-1, 0xbffff88c, WNOHANG, NULL)    = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
time(NULL)                              = 1057141904
kill(10343, SIGUSR1)                    = 0
wait4(-1, 0xbffff88c, WNOHANG, NULL)    = 0
select(0, NULL, NULL, NULL, {1, 0})     = ? ERESTARTNOHAND (To be
restarted)
--- SIGCHLD (Child exited) ---
select(0, NULL, NULL, NULL, {0, 996030} <unfinished ...>

I haven't seen this beheivour before. What is this? Is this a bug in
one of our scripts, what is a way to tied it to the appropriate script
and debug it further?

Thanks in advance,

-G

 
 
 

1. break one loop and skip one iteration of outer loop

I am writing a shell script in which I am using 2 while loops. I want to
break out the inner while loop and skip the current iteration of the outer
while loop. Here is a pseudo script. Can anyone suggest a solution.

while [ some condition ]
do
        statement 1
        statement 2
        while [ some condition ]
        do
            if [ some condition ]
            then
#                I want to goto statement 1
#                 how to implement this -- should I put break but this will
merely go to statement 3 #'                which I dont want to execute. In
other words, break out of the inner loop and
#  skip only the current iteration of the outer loop
#
            else
#               Skip the current iteration of the inner while loop
#                I thiink this can be done by continue isn't it?..so here
goes
                  continue
            fi
        done
        statement 3
        statement 4
done

Any help would be appreciated

2. Q: mount cdrom / no vold

3. apache, day one, hour one, minute one, local write permission !?!?!?!?

4. Strange X-crash

5. How to check the state of child process(s) in one process group

6. Installing yellowdog of a partition

7. Duplicated processes: one zombie, one stopped

8. Mosaic & Term

9. system call starting next process before first process is finished.

10. Leight Weight Processing or Threads in one UNIX process

11. how to avoid apache overload by one client from one IP

12. Zombie processes "owned" by apache processes ...

13. In-process and Out-of-process servlet containers in apache