MaxClients getting maxed out.

Discussion in 'Apache' started by BlackPropeller, Feb 5, 2012.

  1. #1
    Okay, so I have a high traffic website that I host on a dedicated server.
    I have 24gb of ram in total...20gb of which are available to apache itself.

    My MaxClients is currently set to 2000 (that's the absolute max value i could set without having the server start using swap).
    What are my options?? Should I upgrade my ram to 48gb? or look into clustering/load-balancing and get a multi-server setup going?

    Some advice/suggestions would be greatly appreciated! :)
     
    BlackPropeller, Feb 5, 2012 IP
  2. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #2
    hello

    look a big traffic server , one question how are the value in Timeout ?


    Best
     
    Estevan, Feb 6, 2012 IP
  3. BlackPropeller

    BlackPropeller Greenhorn

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    Here's part of my config:
    (I've lowered my MaxClients to 1500 just to be safe)


     
    BlackPropeller, Feb 6, 2012 IP
  4. SolidShellSecurity

    SolidShellSecurity Banned

    Messages:
    262
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    45
    #4
    You should look into maybe using MPM Worker and running nginx or varnish as a front end cache to help reduce load on Apache. How is PHP setup? PM if you have more questions or more help in this area.
     
    SolidShellSecurity, Feb 6, 2012 IP
  5. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #5
    Hello there,

    I would suggest turning KeepAlive off, and, are you also making sure that you fully stop, then start the httpd daemon when you make changed to the maxclients variable? If not, it will not take effect. Is your site PHP/MySQL as well? If so, you may want to look at tweaking those as well.

    Regards,
    Chris
     
    RHS-Chris, Feb 6, 2012 IP
  6. BlackPropeller

    BlackPropeller Greenhorn

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #6
    I always fully stop and start apache no matter what.

    I tried MPM Worker, but i couldn't get eAccelerator to load with that mpm :(
    Is there a ZTS version of eAccelerator around?
     
    BlackPropeller, Feb 7, 2012 IP
  7. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #7
    hello

    follow RHS-Chris words turn KeepAlive off , other suggestion is mod_expires look how use

    # Turn on Expires and set default to 0
    ExpiresActive On
    ExpiresDefault A0

    # Set up caching on media files for 1 year (forever?)
    <filesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
    ExpiresDefault A29030400
    Header append Cache-Control "public"
    </filesMatch>

    # Set up caching on media files for 1 week
    <filesMatch "\.(gif|jpg|jpeg|png|swf)$">
    ExpiresDefault A604800
    Header append Cache-Control "public"
    </filesMatch>

    # Set up 2 Hour caching on commonly updated files
    <filesMatch "\.(xml|txt|html|js|css)$">
    ExpiresDefault A7200
    Header append Cache-Control "proxy-revalidate"
    </filesMatch>

    # Force no caching for dynamic files
    <filesMatch "\.(php|cgi|pl|htm)$">
    ExpiresActive Off
    Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
    Header set Pragma "no-cache"
    </filesMatch>

    Best
     
    Estevan, Feb 8, 2012 IP