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.

I need to track down the bad script... help?

Discussion in 'General Discussion' started by mike_r, Aug 6, 2004.

  1. mike_r

    mike_r Well-Known Member

    Joined:
    Nov 26, 2002
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    There are a lot of PHP scripts and I do believe some of them are badly coded, because httpd suddenly starts using 99.9% of the resources and then calms down after a while and the clients connected are low like 40-48 ...

    So its all due to some script that suddenly does it.

    Is there any way I can find out which PHP Script is causing the trouble???

    Any help would be appreciated..
     
  2. ccccanada

    ccccanada Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    in WHM under System Health click on "Show Current CPU Usage"

    This should show you where the resources are being used at that moment.
     
  3. mike_r

    mike_r Well-Known Member

    Joined:
    Nov 26, 2002
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Yes, and I know its HTTPD ( apache ) takign all the resources, but the main cause is not apache.

    PHP is an apache module and some PHP script is causing the trouble. I cant find out which php script it is though..
     
  4. compunet2

    compunet2 Well-Known Member

    Joined:
    Feb 21, 2003
    Messages:
    310
    Likes Received:
    0
    Trophy Points:
    16
    When its happening, check the "Apache Status" through WHM, and see which sites have activity. In addition, also look at: "CPU/Memory/MySQL Usage" (you can check this anytime). It should give you some clue.
     
  5. mike_r

    mike_r Well-Known Member

    Joined:
    Nov 26, 2002
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Mysql took 532 mb of memory in total, but apache is always the highest user.

    I found that apache was taking 22% of resources to serve a simple gif file of 32 kb. how is that possible ?
     
Loading...

Share This Page