Results 1 to 4 of 4
Hello,
versions are Apache 2.2.16 with Linux Debian
My config is (extract) :
(...)
<IfModule mpm_prefork_module>
StartServers 1
MinSpareServers 1
MaxSpareServers 3
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
User www-data
Group ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-10-2012 #1Linux Newbie
- Join Date
- Dec 2008
- Location
- Luxembourg
- Posts
- 133
Apache: why so many 'root' processes as 'www-data' are expected ?
Hello,
versions are Apache 2.2.16 with Linux Debian
My config is (extract) :
(...)
<IfModule mpm_prefork_module>
StartServers 1
MinSpareServers 1
MaxSpareServers 3
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
User www-data
Group www-data
(....)
Once I start the Apache server, only 'root' processes are created.
After when I start some Apache application, 'www-data' are correctly created.
So 'root' processes are not used ? I should only have *one* root process, correct ?
(1) after Apache re-start .
ps -ef | grep apache
root 3400 1 9 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3408 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3409 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3410 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3411 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3412 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
After start of Apache application, processes www-data are created, but so root are not used, correct ? So what are the root processes for ?
(2) ps -ef | grep apache
root 3400 1 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3408 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3409 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3410 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3411 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3412 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3420 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3422 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3423 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3428 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
root 3436 3400 0 18:52 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 3444 3436 0 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 3447 3428 0 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 3448 3411 0 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 3449 3408 0 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 3450 3409 0 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 3451 3410 0 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
root 3452 3400 0 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 3453 3412 13 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 3454 3420 5 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
root 3455 3400 0 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
root 3456 3400 0 18:53 ? 00:00:00 /usr/sbin/apache2 -k start
Thanks for help and clarification.
Bye,
Bruno
- 01-10-2012 #2
Its because you are binding to a port (80), in order to do that you have to be root. I guess that's why they call ports below 1023 "privileged ports"

Its not going to actually run as root, it forks over to that user you specified (try connecting via browser and loading web pages).linux user # 503963
- 01-10-2012 #3Linux Newbie
- Join Date
- Dec 2008
- Location
- Luxembourg
- Posts
- 133
Yes, but why so many 'root' processes ?
Only *one* should be needed to start the (might be many) 'www-data' processes. Indeed param 'StarServers = 1'
All the *others* 'root' processes are apparently not used.
Bruno
- 01-10-2012 #4
What about worker modules or any other modules? They may not all be for prefork processes.
linux user # 503963


Reply With Quote
