Apache working only with 128 connections but MaxClients is set to 225?

Discussion in 'Apache' started by Drowned, Jan 11, 2009.

  1. #1
    I just got a new server but for some reason I'm not able to make it accept more than 128 connections, requests, whatever they're called. I've tried EVERYTHING google tells me but it'll apache(2) simply ignores my MaxClients setting... well, it's not actually ignoring it but leaving lots of open slots and only handling 128 connections all the time.

    This is how my status looks like all the time :ugh:
    WWWCCKKCKKKCKKCKKCCCWCCCKKCWKKKCWKCWCKWWWWCCCKWCKKCKWKKCKCKKKCKK
    CCWWWKCKCWCCWWWKKCCKKCWKWKWKKKWWWWKWWCKWKCWWKKWWKKWKWCCCKWWKCWCK
    ................................................................
    ........
    Code (markup):
    I have thousands of requests being put on hold although apache still has more than 100 open slots?! :eek: Why would this happen? I have over 2GB of free ram and the cpu is almost idling (load 0.20) with just 128 connections :confused:
     
    Drowned, Jan 11, 2009 IP
  2. mdrafi

    mdrafi Well-Known Member

    Messages:
    433
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    115
    #2
    Contact some web hosting support companies like Assistanz.com
     
    mdrafi, Jan 11, 2009 IP
  3. HSH

    HSH Peon

    Messages:
    73
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    HSH, Jan 11, 2009 IP
  4. Drowned

    Drowned Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Like I said on my first post, the 250 slots are open but Apache is not using all of them, so maxclients and serverlimite are set but apache for some reason only uses 128 of the 250 it has available. Apache keeps the rest of the connections waiting instead of using one of the open slots.
     
    Drowned, Jan 11, 2009 IP
  5. HSH

    HSH Peon

    Messages:
    73
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    What version of Apache?, What server OS/version? It could even be a firewall or gateway issue...
     
    HSH, Jan 11, 2009 IP
  6. Drowned

    Drowned Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Centos 5, Apache 2.2.11 and yes, something like that is what I think is going on but can't figure it out...
     
    Drowned, Jan 11, 2009 IP
  7. HSH

    HSH Peon

    Messages:
    73
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Still need more information.

    If you have a firewall, are you proxying the httpd connections? You may want to check the httpd proxy and see if that limits your connections. I never heard of a router doing that, but I could be mistaken, so you may want to check that as well.

    Do a /usr/sbin/httpd -V and post the results as well.
     
    HSH, Jan 12, 2009 IP
  8. Drowned

    Drowned Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thanks for any tips or ideas, I'm really desperate :(

    Server version: Apache/2.2.11 (Unix)
    Server built:   Jan  9 2009 08:59:50
    Cpanel::Easy::Apache v3.2.0 rev4566
    Server's Module Magic Number: 20051115:21
    Server loaded:  APR 1.3.3, APR-Util 1.3.4
    Compiled using: APR 1.3.3, APR-Util 1.3.4
    Architecture:   64-bit
    Server MPM:     Prefork
      threaded:     no
        forked:     yes (variable process count)
    Server compiled with....
     -D APACHE_MPM_DIR="server/mpm/prefork"
     -D APR_HAS_SENDFILE
     -D APR_HAS_MMAP
     -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
     -D APR_USE_SYSVSEM_SERIALIZE
     -D APR_USE_PTHREAD_SERIALIZE
     -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
     -D APR_HAS_OTHER_CHILD
     -D AP_HAVE_RELIABLE_PIPED_LOGS
     -D DYNAMIC_MODULE_LIMIT=128
     -D HTTPD_ROOT="/usr/local/apache"
     -D SUEXEC_BIN="/usr/local/apache/bin/suexec"
     -D DEFAULT_PIDLOG="logs/httpd.pid"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_LOCKFILE="logs/accept.lock"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="conf/mime.types"
     -D SERVER_CONFIG_FILE="conf/httpd.conf"
    
    Code (markup):
     
    Drowned, Jan 12, 2009 IP
  9. Drowned

    Drowned Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I have no idea if httpd connections are being proxied. The server was just installed with cpanel, so if cpanel doesn't activate that, I doubt it... how can I check that?
     
    Drowned, Jan 12, 2009 IP
  10. Drowned

    Drowned Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    In case this happens to you, mod_proxy was the one at fault. It was giving me segmentation fault errors and killing the extra connections. I simply compiled apache without it and everything went back to normal :)
     
    Drowned, Jan 13, 2009 IP
  11. Acejam

    Acejam Well-Known Member

    Messages:
    314
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    135
    #11
    Hmm I might be having the same issue you had...the status you posted in the original post looks very similar to mine...

    Will try using EasyApache and compile this time around without mod_proxy...
     
    Acejam, Jan 17, 2009 IP