Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Processes on running Tomcat/Apache

    Hi: I am maintaining a web site using Apache/Tomcat servers. I am new to Linux and am trying to understand how it works.

    When I start Apache as root I get 6 processes running on my system. I would think that there should be only one process. I have one process whos user is root(this process id is stored in and 5 other processes with user 'nobody'.

    When I start tomcat I get 30 processes.

    How does this work? Are there any websites on this? Dint come up with anything on google.
    thanks a lot.

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Täby, Sweden
    I don't know anything about the Tomcat server, but Apache is multithreaded. The original process keeps root privileges to be able to do privileged stuff, but it also forks (to learn more about forking, see this post) out a number of childs, over which it attempts to distribute the load. These child processes switch to the 'apache' user if it exists, otherwise the user 'nobody'. This is to limit cracking attempts. If a cracker/worm manages to crack one of the childs, it will just be able to do things that that user could do. That's still bad, but not even half as bad as if it would have gained root privileges.
    I hope that clarifies things a little.

  3. #3
    Just Joined!
    Join Date
    Nov 2002
    Also, you can change the number of available forked processes by using the directives: MinSpareServers, MaxSpareServers and StartServers. You change them by editing the configuration file and restarting apache. Basically you only adjust these for performance issues if you have a high traffic site, otherwise you can just leave them set at the default.

    The documentation is at:

    Make sure you know which version of apache that you are running.

  4. $spacer_open
  5. #4
    Got it now! Thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts