LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   httpd processes (https://www.linuxquestions.org/questions/linux-software-2/httpd-processes-62781/)

Hamma 05-30-2003 07:42 PM

httpd processes
 
I am running a fairly high traffic website (www.planetside-universe.com) and I am seeing some strange things with HTTPD, that I didnt have prior to a recent reinstall and reconfiguration.
Code:

  8:41pm  up 1 day, 11:58,  1 user,  load average: 5.23, 5.24, 5.31
115 processes: 108 sleeping, 7 running, 0 zombie, 0 stopped
CPU states: 96.6% user,  3.3% system,  0.0% nice,  0.0% idle
Mem:  999084K av,  979556K used,  19528K free,      0K shrd,  71488K buff
Swap: 2024180K av,      0K used, 2024180K free                  755924K cached

  PID USER    PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM  TIME COMMAND
 9777 nobody    25  0  7500 7500  5456 R    19.5  0.7 237:08 httpd
 2049 nobody    25  0  7140 7140  5396 R    18.3  0.7 887:10 httpd
22170 nobody    25  0  7008 7008  5404 R    17.9  0.7 217:08 httpd
28955 nobody    25  0  8624 8624  5400 R    17.9  0.8  32:12 httpd
30336 nobody    25  0  6320 6320  5320 R    17.9  0.6  52:29 httpd
21113 nobody    15  0  7540 7540  5348 S    1.9  0.7  0:07 httpd
  218 root      15  0    0    0    0 SW    0.9  0.0  6:25 kjournald
26293 nobody    15  0  9492 9492  5440 S    0.5  0.9  0:05 httpd
  217 root      15  0    0    0    0 SW    0.3  0.0  5:38 kjournald
    6 root      15  0    0    0    0 SW    0.1  0.0  2:04 bdflush
  12 root      15  0    0    0    0 SW    0.1  0.0  4:30 kjournald
  590 root      16  0  548  548  460 S    0.1  0.0  0:12 syslogd
19731 nobody    15  0  7604 7604  5564 S    0.1  0.7  0:11 httpd
20001 nobody    15  0  7408 7408  5400 S    0.1  0.7  0:10 httpd
29061 nobody    15  0  7572 7572  5440 S    0.1  0.7  0:01 httpd

They just keep using more proc and duplicating.. shouldnt they be terminating at some point? Is this normal?

mcleodnine 05-30-2003 09:37 PM

depends on how you've setup your httpd server. Have a look at your httpd.conf for;

ServerType
KeepAlive
MinSpareServers
MaxSpareServers
StartServers

Hamma 05-31-2003 10:52 AM

What exactly am i looking for with those settings?

This morning httpd hung and killed the site, had to be restarted :(

markus1982 05-31-2003 11:00 AM

Are you using Apache 1.3 or Apache 2.0 ?

Hamma 05-31-2003 11:15 AM

1.3.27

Hamma 05-31-2003 11:28 AM

Quote:

Originally posted by mcleodnine
depends on how you've setup your httpd server. Have a look at your httpd.conf for;

ServerType
KeepAlive
MinSpareServers
MaxSpareServers
StartServers

I looked at all these and compared it to my old working configuration, didnt notice anything different.

Is there a spot where httpd logs what its up to (not weblogs, but what the actual processes are up to)

restless 06-01-2003 09:29 AM

I'm having kind of the same problem. After a while my httpd processes start to multiply.. even when i'm not working on my site, or even when i'm not online. This is strange. Or when I'm working on my site (localhost, phpnuke) I get like 9 httpd processes, and they take up like 50MB. Is this normal?

and i'm also using apache 1.3.27 (the one that came with slackware 8.1) and i didn't change any config files...

Code:

ServerType standalone
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5

this is my config...

Hamma 06-01-2003 11:10 AM

I was told by someone to try and update the kernel.

EmbeddedWannabe 06-01-2003 12:38 PM

You may also want to look at moving to Apache 2.0.45, just a thought.
*Emebedded

trickykid 06-01-2003 12:53 PM

Quote:

Originally posted by Hamma
I was told by someone to try and update the kernel.
The kernel would have nothing to do with that....

What about your MaxClients? Do you have anything like that in your configuration? This directive is the maximum amount of connections at any given time.
Basically when you see a httpd process, that means a person or user has requested a page/process to view your website. Everytime someone requests a page, it will start a httpd process. But usually in most cases it should die when they are done, these processes are started then die all the time when running a website.
If you see these processes lingering around for too long, you should try to reconfigure how many MaxKeepAliveRequests or your KeepAliveTimeout.

KeepAliveTimeout - The number of seconds Apache will wait for a subsequent request before closing the connection. Once a request has been received, the timeout value specified by the Timeout directive applies.

Setting KeepAliveTimeout to a high value may cause performance problems in heavily loaded servers. The higher the timeout, the more server processes will be kept occupied waiting on connections with idle clients.


So if you have a high traffic site, try lowering your KeepAliveTimeout setting.. maybe from 15 to 10 or lower.. etc.

If your unsure what some of those directives do, try reading about some of the main core one's here: http://httpd.apache.org/docs/mod/core.html

Hamma 06-01-2003 05:56 PM

Mine are hanging around and not going away at all, the load of my server steadily rises. This morning I was pushing 20.xx load averages then I restarted httpd, from there it just increases again and the processes do not close.

trickykid 06-01-2003 10:43 PM

Quote:

Originally posted by Hamma
Mine are hanging around and not going away at all, the load of my server steadily rises. This morning I was pushing 20.xx load averages then I restarted httpd, from there it just increases again and the processes do not close.
You didn't answer any of my previous questions in my first post or didn't state if you tried any of my suggestions? I understand what is happening as my previous post pretty much explained this and what to try.

Hamma 06-01-2003 10:44 PM

Yes I looked at all those options, I am using the exact same config as I was running on my other box, and I never had these issues :(

trickykid 06-01-2003 11:05 PM

Quote:

Originally posted by Hamma
Yes I looked at all those options, I am using the exact same config as I was running on my other box, and I never had these issues :(
Well, different configs might work better on different machines. I'm not trying to be rude or inconsiderate, but you still didn't answer my questions?
You looked at those options, but did you try any of them? What kind of hardware are we talking about here that your using? More details or no one is going to be able to help you out.

By you stating that your using the same config pretty much tells me you haven't tried anything different though. I can't help you if your not willing to try or answer any questions.

Hamma 06-01-2003 11:10 PM

I looked into all those options and compared my current config to my old one, which nothing has changed. So I assumed that apache, is apache :P

It is a slightly different hardware config, slightly slower proc (about 400mhz slower)

I am updating the kernel to start (tomorrow morning) I will try the tweaks you suggested if the kernel upgrade does not work. I'll post my results here tomorrow ;)


All times are GMT -5. The time now is 11:52 PM.