MaxClients error

Discussion in 'Apache' started by Demexii, Nov 6, 2009.

  1. #1
    Hi, I am new to administering my own websites (non-shared servers) and am having some problems. My server is only displaying static images like pictures and thumbnails. No scripting or database connections. I had everything at the defaults but noticed that it would stop loading once in a while. I would restart httpd and everything was good for a little bit and then the same problem. Now it won't even go a few minutes before I get errors and the server starts to refuse connections.

    [Sat Nov 07 02:05:55 2009] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
    [Sat Nov 07 02:08:10 2009] [error] server reached MaxClients setting, consider raising the MaxClients setting

    My httpd.conf settings:
    Timeout 120
    KeepAlive Off
    MaxKeepAliveRequests 100
    KeepAliveTimeout 15
    <IfModule prefork.c>
    StartServers 8
    MinSpareServers 5
    MaxSpareServers 20
    ServerLimit 1024
    MaxClients 1024
    MaxRequestsPerChild 4000
    </IfModule>
    <IfModule worker.c>
    StartServers 2
    MaxClients 1024
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadsPerChild 50
    MaxRequestsPerChild 0
    </IfModule>

    As you can see I changed the default values to higher numbers but still get the same error within minutes. Even at peak times I'm getting no more than 50 pageviews a second. Am I configuring it wrong? It doesn't seem to be a memory or cpu problem, as they are both pretty low overall.
     
    Demexii, Nov 6, 2009 IP