4

on a linux machine with apache installed, i did a search for httpd by ps -ef | grep httpd,

i saw about 10 httpd processes, why is that?

myuser  14732     1  0 Jan12 ?        00:00:10 /home/myuser/webserver/bin/httpd -k start
myuser  14736 14732  0 Jan12 ?        00:00:00 /home/myuser/webserver/bin/httpd -k start
myuser  31309 14732  0 Jan14 ?        00:00:00 /home/myuser/webserver/bin/httpd -k start
myuser  31313 14732  0 Jan14 ?        00:00:00 /home/myuser/webserver/bin/httpd -k start

thx.

hetaoblog
  • 249
  • 1
  • 3
  • 14
  • Sounds similar to this thread: http://serverfault.com/questions/272296/why-do-i-have-so-many-apache2-processes – cherrun Mar 01 '12 at 08:39

3 Answers3

4

You started the parent, and the parent started the worker children.

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
1

You might want to read up Apaches Documentation on MPM. This is the definitive guide. I'd also recommend reading up on how Unix Daemons work in general.

Long story (naive) and short:

  • You have a "controlling" process
  • Each "worker" process handles a client
serverhorror
  • 6,478
  • 2
  • 25
  • 42
1

These are child processes, the number of which is controlled by the startservers directive to the apache prefork or worker modules.

user9517
  • 115,471
  • 20
  • 215
  • 297