Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    156
    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:
    166
    in WHM under System Health click on "Show Current CPU Usage"

    This should show you where the resources are being used at that moment.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mike_r

    mike_r Well-Known Member

    Joined:
    Nov 26, 2002
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    156
    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:
    166
    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:
    156
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice