Apache tuning settings

Discussion in 'Apache' started by Noodles25, Apr 10, 2007.

  1. #1
    I've got a site that does about 15 million hits a day, which is load balanced between 4 servers.

    We have had one server peaking out on its MaxClients setting, so I've been bumping that up, but it's probably not the best solution. When apache runs out of clients it refuses all other connections, even though cpu/memory resources are fairly low.

    Here's what I've got at the moment:

    
    ServerLimit        400
    StartServers        10
    MinSpareServers     32
    MaxSpareServers     64
    MaxRequestsPerChild  0
    KeepAliveTimeout     2
    
    Code (markup):
    Is there a better way to do this? Can anyone help?

    TIA
     
    Noodles25, Apr 10, 2007 IP
  2. edhan

    edhan Active Member

    Messages:
    364
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #2
    This is what I use for my Apache server setting:

    Timeout 50
    KeepAlive On
    MaxKeepAliveRequests 120
    KeepAliveTimeout 10
    MinSpareServers 10
    MaxSpareServers 20
    StartServers 16
    MaxClients 125
    MaxRequestsPerChild 5000

    Hope this helps.
     
    edhan, Apr 10, 2007 IP
  3. Noodles25

    Noodles25 Active Member

    Messages:
    75
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #3
    It doesn't really help, no

    What sort of traffic does your site get?
     
    Noodles25, Apr 11, 2007 IP
  4. asimo

    asimo Peon

    Messages:
    220
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    its all depending what kind of site u r running
     
    asimo, May 7, 2007 IP
  5. Noodles25

    Noodles25 Active Member

    Messages:
    75
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #5
    we're running a high traffic PHP/MySQL site
     
    Noodles25, May 7, 2007 IP
  6. Juan Pablo Olivera

    Juan Pablo Olivera Peon

    Messages:
    53
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Try this:

    
    Timeout 30
    Keepalive On
    
    Code (markup):
    or

    
    Timeout 15
    Keepalive Off
    
    Code (markup):
    one of those should help a bit, then you can keep tweaking it, just read the apache manual and play with the rest of the values. Don't forget to restart apache each time you modify httpd.conf.

    You can also install Zend Optimizer and/or eAcellerator and/or APC

    Hope that helps :)
     
    Juan Pablo Olivera, May 8, 2007 IP