Severe problem with concurrent apache processes

Discussion in 'Apache' started by eloy, May 18, 2011.

  1. #1
    I have a simple php script (without mysql) which is usually processed lesser than 1s. But when the number of concurrent apache processes increases to higher than 10, the process time for the php page is 10-30s.

    I tested on three different VPSs running CentOS 5.5. The control panel is Virtualmin. Any idea?
     
    eloy, May 18, 2011 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    you most likely have an appache module
    server-tuning.conf
    and there you may have ONE of the two options to tune your sever
    <IfModule prefork.c>
    or
    <IfModule worker.c>

    that defines how many server children are started, spare servers, etc

    have a look at your server tuning numbers and adjust to meed real world needs

    for example I have on a fairly high traffic site (up to 80'000+ uv/day on peak days) the following limits in my "server-tuning.conf"
    I use openSuSE but the appache settings are most likely very similar across most Linux dists

    # prefork MPM
    <IfModule prefork.c>
    StartServers 10
    MinSpareServers 5
    MaxSpareServers 10
    ServerLimit 150
    MaxClients 150
    MaxRequestsPerChild 10000
    </IfModule>
     
    hans, May 19, 2011 IP