Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've tried to configure my Apache server to use a maximum of 120 threads and one (Oracle) SQL connection per thread. I did this by setting:

MaxClients 120

in httpd.conf file. I also set:

oci8.max_persistent = 1

in php.ini file.

However, I see the number of threads/connections occasionally going over 120. Am I missing something?

Thanks.

share|improve this question
    
How high over 120? –  mahnsc Jul 11 '11 at 3:21

2 Answers 2

As bindbn tells you, you should check the MPM

# apache2 -V | grep "Server MPM" 
Server MPM:     XXXX

And as you answer him, you're using 'prefork', configuration it's pretty similar to worker:

<IfModule prefork.c>
  StartServers            8
  MinSpareServers         5
  MaxSpareServers        20
  MaxClients            150
  MaxRequestsPerChild  1000
</IfModule>

More info:

http://www.devside.net/articles/apache-performance-tuning

http://www.camelrichard.org/apache-prefork-vs-worker

share|improve this answer
1  
Both links are broken. –  Flimm Apr 22 '13 at 13:46

Check MPM:

# apache2 -V | grep "Server MPM"
Server MPM:     Worker

Check that the correct section changed:

<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      60
    ThreadLimit          55
    ThreadsPerChild      25
    MaxClients          120
    MaxRequestsPerChild   0
</IfModule>

http://httpd.apache.org/docs/current/mod/mpm_common.html

share|improve this answer
    
Thanks for your answer. Server MPM is actually set to "prefork", so that no threading is used. The MaxClients directive is set on the global level. –  Dario Oct 15 '10 at 8:24

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.