A lot of apache processes

Discussion in 'Site & Server Administration' started by ASTRAPI, Jan 10, 2011.

  1. #1
    Hello

    On my server sx quad xeon i can see for many minutes a server load of 20 and 30 from cpanel and my sql usage is very low about 50% and ram 6%...

    I can see a lot about 40 of :

    /usr/local/apache/bin/httpd -k start -DSSL

    When the server load go after many minutes and maybe an hour i have about 15:

    /usr/local/apache/bin/httpd -k start -DSSL

    Any ideas?

    I am using centos and nginx in front of apache and i use these settings:


    KeepAlive: On
    MaxKeepAliveRequests: 100
    KeepAliveTimeout: 5
    MinSpareServers: 15
    MaxSpareServers: 25
    StartServers: 15
    MaxClients: 384
    MaxRequestsPerChild: 1000

    Thank you
     
    ASTRAPI, Jan 10, 2011 IP
  2. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #2
    I think apache start m,ore processes (each handle multiple connections) as more clients connects
    I suggest you run "top" to see what is the cause of high server load
     
    atxsurf, Jan 10, 2011 IP
  3. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Many active apache connections...

    And that give a high cpu load on sql :(
     
    ASTRAPI, Jan 10, 2011 IP
  4. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #4
    you should either optimize your script and mysql queries (e.g. use indexes) or get more powerful hosting

    PS: or limit the access to your server - for example there might be some bots that actively crawling your site and artificially loading the server
     
    atxsurf, Jan 10, 2011 IP
  5. marsh_candy

    marsh_candy Active Member

    Messages:
    183
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #5
    It could also due to some applications eating much resources like PHP, etc..

    Cheers.
     
    marsh_candy, Jan 11, 2011 IP
  6. Vadym Kurylovych

    Vadym Kurylovych Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    1) set KeepAlive off
    2) set MinSpareServers to 1-2
    3) install apc
    4) check which site make load on server and optimize it code/queries
     
    Vadym Kurylovych, Jan 11, 2011 IP
  7. rllunzmann

    rllunzmann Active Member

    Messages:
    1,796
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    80
    #7
    Based on what I'm seeing from your log above, httpd is general web traffic, etc.. Being that it's a quad xenon, how does the CPU usage look during the heightened period? RAM usage may be relatively low during this period but my main concern is Apache / CPU usage during this time. I know that WHM (if you are using this) reports are generally not up to the minute but lag a short while behind.
     
    rllunzmann, Jan 11, 2011 IP