LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-26-2007, 08:09 PM   #1
cam34
Member
 
Registered: Aug 2003
Distribution: Fedora 22, Debian 8, Centos 6/7 for servers
Posts: 101

Rep: Reputation: 16
Apache2 - 11 Process Running? is this right?


Hi!
I have a apache2, PHP and mysql server running on the same machine.
when i type 'ps aux'
I have 11x

/usr/sbin/apache2 -k start -DSSL.

Listed.
Of which root owns one and www-data owns 10.

I then type '/etc/init.d/apache2 stop'
All processes die, I then restart with: '/etc/init.d/apache2 start'

Code:
root      3974  1.6  3.2  51216  6212 ?        Ss   21:37   0:00 /usr/sbin/apache2 -k start -DSSL
www-data  3978  0.0  1.6  51216  3220 ?        S    21:37   0:00 /usr/sbin/apache2 -k start -DSSL
www-data  3979  0.0  1.6  51216  3220 ?        S    21:37   0:00 /usr/sbin/apache2 -k start -DSSL
www-data  3980  0.0  1.6  51216  3220 ?        S    21:37   0:00 /usr/sbin/apache2 -k start -DSSL
www-data  3981  0.0  1.6  51216  3220 ?        S    21:37   0:00 /usr/sbin/apache2 -k start -DSSL
www-data  3982  0.0  1.6  51216  3220 ?        S    21:37   0:00 /usr/sbin/apache2 -k start -DSSL
And i now have 6 processes - of which root owns 1x

My questions are:
Should this many processes be running on an idle (but used) machine.
How do i stop root from running one of them (process) - Is this normal?
How can i stop 11x processes starting when rebooted? (Eats all the memory)

Thanks
--cAm
 
Old 07-27-2007, 09:13 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
The first process (the one owned by root) is used to spawn the others that are actually used for connections. The number of these processes is defined by the "StartServers" option in httpd.conf.
 
Old 07-28-2007, 04:26 AM   #3
cam34
Member
 
Registered: Aug 2003
Distribution: Fedora 22, Debian 8, Centos 6/7 for servers
Posts: 101

Original Poster
Rep: Reputation: 16
would you have 1 process per connection or can a process handle more than connection?
 
Old 07-28-2007, 10:01 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
From apache documentation:

Quote:
The StartServers directive sets the number of child server processes created on startup. As the number of processes is dynamically controlled depending on the load, there is usually little reason to adjust this parameter.
The default value differs from MPM to MPM. For worker the default is StartServers 3. For prefork defaults to 5 and for mpmt_os2 to 2.
top
Every child process created can serve one request.
 
Old 07-28-2007, 05:19 PM   #5
cam34
Member
 
Registered: Aug 2003
Distribution: Fedora 22, Debian 8, Centos 6/7 for servers
Posts: 101

Original Poster
Rep: Reputation: 16
Dynmamic you say. Ok well great that answer my questions I suppose.

Thanks
 
  


Reply



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
Bad page state in process apache2 (Server reboots frequently) Zeest Linux - Server 2 05-17-2007 11:13 PM
Apache2 does not appear to be running tranzy Ubuntu 2 03-13-2007 12:25 PM
apache2 not running mikolaj Slackware 10 09-26-2004 12:00 PM
Apache2 running but not? Relja Linux - Networking 6 03-22-2004 04:28 AM
Problem running apache2 G24 Linux - Networking 7 01-01-2004 09:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:10 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration