Results 1 to 10 of 22
Hi,
I have compiled and installed httpd version 2.0.48 on a server and everymorning i see many httpd processes. These processes take CPU equalpercentage among themselves and make the processor ...
- 02-27-2004 #1Linux Newbie
- Join Date
- Feb 2004
- Location
- India
- Posts
- 132
Many httpd processes
Hi,
I have compiled and installed httpd version 2.0.48 on a server and everymorning i see many httpd processes. These processes take CPU equalpercentage among themselves and make the processor 100% busy. Thus slowing down the server. When i stop and start the server theseprocesses go away. This happens every morning and otherwise the webserver works fine. Is there a way to automatically kill/stop these unwanted processes?
How to do this from the configuration file?
I have the following settings and errors
//
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 100
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>
\\
From error.log(many such errors/warnings about child processes during service httpd restart):
//[Fri Feb 27 08:03:07 2004] [warn] child process 20944 still did notexit, sending a SIGTERM
[Fri Feb 27 08:03:07 2004] [warn] child process 20974 still did notexit, sending a SIGTERM
[Fri Feb 27 08:03:07 2004] [warn] child process 21051 still did notexit, sending a SIGTERM
[Fri Feb 27 08:03:08 2004] [notice] caught SIGTERM, shutting down
[Fri Feb 27 08:03:34 2004] [notice] Digest: generating secret for digest authentication ...
[Fri Feb 27 08:03:34 2004] [notice] Digest: done
[Fri Feb 27 08:03:35 2004] [notice] Apache/2.0.48 (Unix) configured --resuming normal operations
\\
Also there are total 25 such processes.Have i done any misconfiguration? I have also tried recompilation but it did not help.I used "./configure --enable-mods-shared=all --enable-ssl"I have compiled this version on other machines but such error never occurred. Any suggestions will help
. Thank you.
-- Anand.You are the one Linux!
- 02-27-2004 #2Linux User
- Join Date
- May 2003
- Location
- CA
- Posts
- 370
there is a way to kill/stop the unwanted processes but for doing that you would have to know the exact pid's of all the processes which I guess is not possible since they would change from day to day. You might want to see why there are 25 processes running...on my machine I have one parent process and 8 child processes running...its strange that you get so many processes only in the mornings...did you try a different version of apache 1.x perhaps?
Fixing Unix is better than working with Windows.
http://nikhilk.homedns.org/projects/index.html
- 02-28-2004 #3Linux Newbie
- Join Date
- Feb 2004
- Location
- India
- Posts
- 132
Hi Nikhil,
The httpd version which i have installed is one of the stable versions and i have tried it on other servers also. I cannot try 1.3 version (v/s 2.x) currently since its of the different breed right? I am puzzled about the processes which remain and does not die out. Even the method of 'kill'ing the processes is not wise right? I wanted that the unwanted processes should perish automatically.
Thank you.
You are the one Linux!
- 02-29-2004 #4Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Apache is supposed to have several processes (it keeps a number of worker threads). However, they are clearly not supposed to take up your CPU all the time. Try stracing one of them to try and find out what they're doing with their cycles.
- 03-01-2004 #5Linux Newbie
- Join Date
- Feb 2004
- Location
- India
- Posts
- 132
Hi,
Regarding the "Many http processes"
I am new to debugging i tried the following:
Code:----------------- top o/p 22617 apache 15 0 15184 14M 5960 S 0,0 2,9 0:03 0 httpd 22618 apache 15 0 13668 13M 5948 S 0,0 2,6 0:01 0 httpd 22619 apache 15 0 10152 9,9M 5564 S 0,0 1,9 0:00 0 httpd 22620 apache 15 0 8924 8924 5568 S 0,0 1,7 0:00 0 httpd 22621 apache 15 0 13440 13M 5896 S 0,0 2,6 0:00 0 httpd 22624 apache 15 0 10348 10M 5596 S 0,0 2,0 0:00 0 httpd 22625 apache 15 0 10504 10M 5724 S 0,0 2,0 0:00 0 httpd 22626 apache 15 0 10404 10M 5656 S 0,0 2,0 0:00 0 httpd 22790 apache 15 0 8056 8056 5060 S 0,0 1,5 0:00 0 httpd ------------------ top o/p end
Was this expected ? apache was running normally when i tried this. Please help !Code:-----------------I got the following o/p for strace [root@test root]# strace -p 22790 trace: ptrace(PTRACE_SYSCALL, ...): Operation not permitted detach: ptrace(PTRACE_DETACH, ...): Operation not permitted ---------------

Mod edit: added code tags.You are the one Linux!
- 03-01-2004 #6Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
No, that was not expected...
However, I can't see that those processes are actually doing the bad things that you described. If this is indeed a top output, then they aren't consuming any CPU cycles at all. Does the thing that you described happen often?
- 03-02-2004 #7Linux User
- Join Date
- May 2003
- Location
- CA
- Posts
- 370
yeah...%CPU shows 0.0...so its not consuming cpu at all....maybe its something else thats eating up your cpu cycles!!
Fixing Unix is better than working with Windows.
http://nikhilk.homedns.org/projects/index.html
- 03-02-2004 #8Linux Newbie
- Join Date
- Feb 2004
- Location
- India
- Posts
- 132
Apache was running normally when i tried strace!
You are the one Linux!
- 03-02-2004 #9Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Well, in that case I don't see the problem. You said that those processes were taking up the entire CPU, while in fact they aren't. Would you mind clarifying that?
- 03-03-2004 #10Linux Newbie
- Join Date
- Feb 2004
- Location
- India
- Posts
- 132
This morning the status was like this!
Thus cpu was 0 % freeCode:----------------------top: 31288 apache 25 0 6860 6304 2464 R 7,9 1,2 8:11 0 httpd 31618 apache 25 0 5848 5280 2340 R 7,9 1,0 5:51 0 httpd 31639 apache 25 0 6744 6188 2476 R 7,9 1,2 3:16 0 httpd 31652 apache 25 0 5860 5292 2340 R 7,9 1,0 4:05 0 httpd 31549 apache 25 0 8456 7684 2472 R 7,1 1,4 2:41 0 httpd 31290 apache 25 0 6776 6220 2400 R 6,5 1,2 9:31 0 httpd 31286 apache 25 0 6692 6136 2396 R 5,9 1,1 24:12 0 httpd 31287 apache 25 0 6724 6168 2432 R 5,9 1,2 13:46 0 httpd 31289 apache 25 0 5932 5364 2360 R 5,9 1,0 17:51 0 httpd 31514 apache 25 0 6648 5972 2400 R 5,9 1,1 4:50 0 httpd 31551 apache 25 0 6704 5620 2388 R 5,9 1,0 11:33 0 httpd 31651 apache 25 0 7020 6184 2808 R 5,9 1,2 1:30 0 httpd 31675 apache 25 0 7492 6848 3112 R 5,9 1,3 0:54 0 httpd 31803 apache 25 0 6084 5516 2564 R 5,9 1,0 1:59 0 httpd 31861 apache 25 0 6952 6384 3444 R 5,9 1,2 0:27 0 httpd 31616 apache 15 0 7352 6796 3148 S 0,0 1,3 0:00 0 httpd 31658 apache 15 0 9696 9092 3812 S 0,0 1,7 0:00 0 httpd 31796 apache 15 0 9516 8960 3544 S 0,0 1,7 0:00 0 httpd 31804 apache 15 0 7584 7028 3192 S 0,0 1,3 0:00 0 httpd 31805 apache 15 0 7524 6968 3284 S 0,0 1,3 0:00 0 httpd 31860 apache 15 0 5848 5276 2716 S 0,0 1,0 0:00 0 httpd 31862 apache 15 0 5928 5356 2748 S 0,0 1,0 0:00 0 httpd 31539 apache 25 0 6736 6172 2396 T 0,0 1,2 6:39 0 httpd --------------------------
Please tell me what can i do now?Code:-------------------------- [root@test root]# strace -p 31286 trace: ptrace(PTRACE_SYSCALL, ...): Operation not permitted detach: ptrace(PTRACE_DETACH, ...): Operation not permitted [root@test root]# --------------------------
Is there a problem in apache? or i tried the wrong command?
Thank you
You are the one Linux!


Reply With Quote
