The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache/PHP CPU issue

Discussion in 'EasyApache' started by n000b, Jul 12, 2010.

  1. n000b

    n000b Well-Known Member

    Joined:
    Apr 7, 2005
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    One of my servers has randomly started crashing occasionally (once every few days). The server is staying online but the load is spiking up to 400+ and the server is just grinding to a halt. I managed to get some logs while it happened, and I noticed that Apache/PHP is absolutely flogging the server. Here is my Apache's status at a normal time on the server:

    And here it is during the problem:

    During the problem there are hundreds of PHP processes running and 50+ Apache processes running.

    The reason the load is spiking is because the server is running out of memory (the server usually sits at around 1GB free memory, but this problem uses it all up). Does anyone know what could be causing Apache or PHP to do this? I'm running PHP5, Apache 2.2 with suPHP.
     
  2. Miraenda

    Miraenda Well-Known Member

    Joined:
    Jul 28, 2004
    Messages:
    242
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Coralville, Iowa USA
    Are you using suPHP and can see which users are running these processes? The WHM > Daily Process Logs area should be showing which specific users are high usage. Given it's hundreds of PHP processes, it sounds more like one or more accounts causing it than anything else. If it were a denial of service attack, those normally result in high number of Apache processes but not a high number of PHP processes. Some high traffic or high usage script is the most likely culprit.
     
  3. n000b

    n000b Well-Known Member

    Joined:
    Apr 7, 2005
    Messages:
    142
    Likes Received:
    0
    Trophy Points:
    16
    Thank you - I have studied the logs and it appears as though a certain website is getting hit hard by something.
     
Loading...

Share This Page