Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number of Daemons on!?

Status
Not open for further replies.

Bernini

Programmer
Joined
Oct 26, 2004
Messages
98
Location
MT
Hi

I've installed Apache 2.0 on my Fedora machine. When i execute the "ps -ef" command i can see that the HTTPD daemon is present about 10 times. The first being owned by the root user the rest by apache!

Why is it so? can anyone explain pls? Also it tends to switch off every week and i have to restart manually each time?

Any ideas are most welcome!

Thanks
B
 
The httpd spawns several threads to handle incoming requests. Depending on your version of the kernel, ps and top, these threads may show up as if they were seperate processes.

You httpd dying weekly may have something to do with a cron job. Is anything attempting to roll your logs?
 
Thanks ericbrunson! So its normal that there are seversal of those connections!?

I will check on teh cron job! do you have any idea where best to look at?

Thanks again
Nick
 
Check for a 'logrotate' script. Someone else was having a problem with that earlier this week.
 
The number of server processes is controlled by the following lines in httpd.conf:

MinSpareServers 5
MaxSpareServers 10
 
Does that control processes or threads? Or does it just use the one that apache was compiled for?
 
It is processes. When apache starts up, you get 5 process's to handle the load. As traffic may fill up your 5 slots, a max of 10 may be spawned. During low activity, the process's just sit idle and do nothing. So ie if you have a lot of hits, you increase these numbers. If you have php, there is a server-status function that shows you all your process, hits, and more information.
 
Thanks guys...tomorw first thing then i'll check the logs and i'll let u know!


thanks
B
 
The server-status function is built into Apache. Just enable it with this config snippet:

<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1 (or your monitoring station ip)
</Location>

Then I also have "ExtendedStatus On" for more information.

 
Hi again

So the number of Servers spawned has been solved...didn't know about it...thanks all again!

About the Server stopping weekly..well i didn't understand much...and i still can;t figure out what's wrong!


Thanks again
B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top