LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-30-2003, 07:42 PM   #1
Hamma
Member
 
Registered: May 2003
Distribution: RedHat 7
Posts: 35

Rep: Reputation: 15
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?
 
Old 05-30-2003, 09:37 PM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

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

ServerType
KeepAlive
MinSpareServers
MaxSpareServers
StartServers
 
Old 05-31-2003, 10:52 AM   #3
Hamma
Member
 
Registered: May 2003
Distribution: RedHat 7
Posts: 35

Original Poster
Rep: Reputation: 15
What exactly am i looking for with those settings?

This morning httpd hung and killed the site, had to be restarted
 
Old 05-31-2003, 11:00 AM   #4
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Are you using Apache 1.3 or Apache 2.0 ?
 
Old 05-31-2003, 11:15 AM   #5
Hamma
Member
 
Registered: May 2003
Distribution: RedHat 7
Posts: 35

Original Poster
Rep: Reputation: 15
1.3.27
 
Old 05-31-2003, 11:28 AM   #6
Hamma
Member
 
Registered: May 2003
Distribution: RedHat 7
Posts: 35

Original Poster
Rep: Reputation: 15
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)
 
Old 06-01-2003, 09:29 AM   #7
restless
Member
 
Registered: Feb 2003
Location: Belgium
Distribution: Debian
Posts: 166

Rep: Reputation: 31
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...
 
Old 06-01-2003, 11:10 AM   #8
Hamma
Member
 
Registered: May 2003
Distribution: RedHat 7
Posts: 35

Original Poster
Rep: Reputation: 15
I was told by someone to try and update the kernel.
 
Old 06-01-2003, 12:38 PM   #9
EmbeddedWannabe
LQ Newbie
 
Registered: Mar 2003
Posts: 9

Rep: Reputation: 0
You may also want to look at moving to Apache 2.0.45, just a thought.
*Emebedded
 
Old 06-01-2003, 12:53 PM   #10
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
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
 
Old 06-01-2003, 05:56 PM   #11
Hamma
Member
 
Registered: May 2003
Distribution: RedHat 7
Posts: 35

Original Poster
Rep: Reputation: 15
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.
 
Old 06-01-2003, 10:43 PM   #12
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
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.
 
Old 06-01-2003, 10:44 PM   #13
Hamma
Member
 
Registered: May 2003
Distribution: RedHat 7
Posts: 35

Original Poster
Rep: Reputation: 15
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
 
Old 06-01-2003, 11:05 PM   #14
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
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.
 
Old 06-01-2003, 11:10 PM   #15
Hamma
Member
 
Registered: May 2003
Distribution: RedHat 7
Posts: 35

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
service httpd status, results in httpd dead but subsys locked squadja Red Hat 2 09-11-2004 10:31 PM
monitoring active processes and identifying the required processes. gajaykrishnan Programming 2 08-13-2004 01:58 AM
HTTPD running multiple processes jjustin01 Linux - Software 1 03-04-2004 07:16 AM
httpd opening up to many processes artistik Linux - Software 1 09-28-2003 02:30 PM
5 httpd processes running on an idle box? J_Szucs Linux - Networking 2 04-07-2003 08:58 PM


All times are GMT -5. The time now is 06:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration