Multiple Instances of httpd

Dris

The Benevolent
For some reason, I'm getting multiple instances of httpd...I noticed a while back. Then it was just one for www and the other for root. Then today, my computer slowed WAY WAY down...I went to Process Viewer to find the usual root httpd, plus like 7 www instances, all using around 20% of my resources! Needless to say, dynamic pager shot up to like 70% of CPU usage. Why am I getting multiple instances of httpd? Can I do anything about it? Thanks.
 
these show that someone is connected to your server.

what you can do:
In Terminal type in the command "top", find the PID (process ID) of the httpd. prolly you can do this in process viewer too
in another terminal window type "sudo kill PID", replacing PID with the appropriate number

done :)
You've killed the process running, when someone is viewing your website, will stop the loading of page or files to the person viewing too, though


hope you understand what I just wrote :D
 
Also the one owned by root doesn't answer requests it just spins off the other ones. It has to be root to bind to port 80. The number of other processes can be configured in your apache config files. But a half dozen doesn't should to bad, also it doesn't necessarily mean that someone is actively connected to you, that is also a function of how things are configured and I don't know what the default is on OSX.

At any rate look at the CPU they are using up and if it is really low the most likely aren't the source of your slowdown. Almost all of the memory they use is shared so 10 instances are not significantly bigger than just one in practical terms.

-Eric
 
Ah, thank you both, I understand now. Quite odd that there would be so many people connected, but I suppose I can't really be sure, as you said it's a function of some configuration. Thanks a lot for the explanation!
 
Back
Top