server reached MaxClient settings, consider raising the MaxClients setting

Discussion in 'Server Operation' started by edge, Aug 14, 2006.

  1. edge

    edge Active Member Moderator HowtoForge Supporter

    My Apache2 sometimes gets really slow..

    Looking at the log file it's showing server reached MaxClient settings, consider raising the MaxClients setting at the times apache is slow, so I guess that this is causing the slowdown.

    After some googling I found this.

    The problem now is that I do not have MaxClients in the /etc/apache2/httpd.conf , but I do have it in /etc/apache2/apache2.conf

    In apache2.conf I have to times a MaxClients!

    Code:
    <IfModule prefork.c>
    StartServers 50
    MinSpareServers 50
    MaxSpareServers 200
    MaxClients 256
    MaxRequestsPerChild 1
    </IfModule>
    
    <IfModule worker.c>
    StartServers         2
    MaxClients         150 
    MinSpareThreads     25
    MaxSpareThreads     75
    ThreadsPerChild     25
    MaxRequestsPerChild  0
    </IfModule>
    

    Do I need to set both MaxClients, or do I need to add a MaxClients to the httpd.conf?

    Also. The server (Debain Sarge 3.1) has 4GB of memory.. Will a MacClients of lets say 1000 be okay?
     
    Last edited: Aug 14, 2006
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    I guess you use prefork (as most installations do), so set it in the prefork stanza.

    No, httpd.conf is included in apache2.conf, so there's no need to set it in httpd.conf.

    Have a look here: http://www.howtoforge.com/forums/showthread.php?t=5137&highlight=MaxClients
    Normally, the upperl imit for MaxClients is 256. If you need a higher value, you must also set ServerLimit.
     

Share This Page