Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have some problems with my website configuration (apache2 on gentoo)

I have too many processes launched by the apache's user, here an example:

nobody   29708  0.0  0.0  36292  3496 ?        S    12:11   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   29762  0.0  0.0  35988  3080 ?        S    12:11   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   29763  0.0  0.0  36284  3480 ?        S    12:11   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   29776  0.0  0.0  36076  3408 ?        S    10:08   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   29819  0.0  0.0  35988  3084 ?        S    12:11   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   29820  0.0  0.0  36020  3168 ?        S    12:11   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   29821  0.0  0.0  35988  3092 ?        S    12:11   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   29822  0.0  0.0  35988  3156 ?        S    12:11   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   30680  0.0  0.0  36088  3444 ?        S    10:19   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   30734  0.0  0.0  36096  3448 ?        S    10:19   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
root     30928  0.0  0.0   4896   760 pts/0    R+   12:12   0:00 grep --colour=auto nobody
nobody   31159  0.0  0.0  36200  3564 ?        S    10:27   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   31696  0.0  0.0  36148  3772 ?        S    12:02   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   31985  0.0  0.0  36060  3344 ?        S    12:03   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   32223  0.0  0.0  36292  3512 ?        S    12:03   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start
nobody   32250  0.0  0.0  36292  3496 ?        S    12:03   0:00 /usr/local/apache/bin/httpd -D SSL -D SSL_DEFAULT_VHOST -k start

Here is my vhost files for this website :

<VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot /home/XYZ/www
        SuexecUserGroup usersite users
        ServerName eleves.monsite.fr
        CustomLog logs/eleves.monsite.fr-access_log combined
        ScriptAlias /cgi-bin/ /home/monsite/cgi-bin/
        AddHandler x-httpd-php5 .php
</VirtualHost>

I am on a gentoo distrib, gentoo ovh2 release and I'm not a pro with this...

I tried to modify apache's configuration (start servers / timeout etc...) but I don't know which value i can put there.

Timeout 400

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 30

<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients         150
MaxRequestsPerChild  0
</IfModule>

<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

<IfModule perchild.c>
NumServers           5
StartThreads         5
MinSpareThreads      5
MaxSpareThreads     10
MaxThreadsPerChild  20
MaxRequestsPerChild  0
</IfModule>

<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
</IfModule>

<IfModule beos.c>
StartThreads               10
MaxClients                 50
MaxRequestsPerThread       10000
</IfModule>

<IfModule mpm_netware.c>
ThreadStackSize      65536
StartThreads           250
MinSpareThreads         25
MaxSpareThreads        250
MaxThreads            1000
MaxRequestsPerChild      0
MaxMemFree             100
</IfModule>

<IfModule mpmt_os2.c>
StartServers           2
MinSpareThreads        5
MaxSpareThreads       10
MaxRequestsPerChild    0
</IfModule>

AddHandler cgi-script .cgi

Others-things , my php version :

PHP 5.2.13-pl1-gentoo (cgi) (built: Feb 11 2011 11:02:12)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

If someone can explain me the difference between CGI/CLI php installation package .. :s This problems happened only on 1 website hosted by my server, other websites are OK. The site which encounters this issue lags really really very much.

share|improve this question
How many processes is too many? How do you know? Also, you should open a new question to ask your question about PHP. It should not be asked here in this question about Apache. – depquid Jun 12 at 14:02

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.