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.

PHP Loads (By Customer Not CPanel)

Discussion in 'General Discussion' started by AlexSmithMCP, Jun 6, 2005.

  1. AlexSmithMCP

    AlexSmithMCP Well-Known Member

    Joined:
    May 26, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi all,

    I have one customer whos site is causing massive loads on my (addmitidly not that powerfull server - celeron 2.4GHz 1GB DDR RAM) using PHP Scripts.

    Code:
    User     Domain                               CPU %  Memory %        MySQL Processes
    stealth	(domain removed)	26.89	86.72	            0.8
    Top Process	%CPU 42.0	httpd (domain removed) (/go.php?goDownload&id5263)
    
    what i need to know is there anyway that i can stop this from happening, either be it caping that users access to resources (suExec is in use) or any other methods. I have spoken to the customer in question and asked them to check over their scripts but its causing loads like this

    Code:
    - Events Summary:
    Total event count:   5
    Average event count: 2
    
    - Service Summary:
    No service modules enabled - edit conf.sim
    
    - System Summary:
    LOAD      [30.05 - status warning - 5 events]
    NETWORK   [eth0 - online - 0 events]
    
    - SIM Log:
    [06/05/05 17:07:30]: LOAD 76.21 (status critical)
    [06/05/05 17:07:30]: load status critical, reprioritizing processes.
    [06/05/05 17:07:30]: reniced 0 processes to prirotiy 6
    [06/05/05 17:07:30]: NETWORK is online.
    [06/05/05 17:07:59]: removed stale lock file.
    [06/05/05 17:07:59]: LOAD 72.33 (status critical)
    [06/05/05 17:07:59]: load status critical, reprioritizing processes.
    [06/05/05 17:07:59]: reniced 0 processes to prirotiy 6
    [06/05/05 17:07:59]: NETWORK is online.
    [06/05/05 17:10:11]: LOAD 54.12 (status critical)
    [06/05/05 17:10:11]: NETWORK is online.
    [06/05/05 17:12:32]: LOAD 42.66 (status warning)
    [06/05/05 17:12:32]: NETWORK is online.
    [06/05/05 17:15:01]: LOAD 30.05 (status warning)
    [06/05/05 17:15:01]: NETWORK is online.
    which i find highly worrying as it knocks the server offline breifly when loads like that happen :/ any advice is greatly apprcated.

    Kind Regards,

    Alex A. Smith
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You could have a look at the mod_bandwidth apache module available through WHM Addons. If you enable phpsuexec then the Shell/For Bomb protection should come into play as php scripts are then forked into a separate process from the apache child.

    Ultimately, if someone is (ab)using the server resources beyond that which the server can cope with, the responsibility is theres to either relieve load by removing applications, or taking their site to a dedicated server where they can (ab)use as much as they like ;)
     
  3. AlexSmithMCP

    AlexSmithMCP Well-Known Member

    Joined:
    May 26, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thanks for the reply, I'm going to go over my PHP Compile settings anyways as Curl seems to be giving me problems so i'll enable phpsuexec while im in there. Shell fork/bomb protection is enabled anyways (just to be on the safe side).

    I'm liking the last idea ;)
     
  4. cheapunix

    cheapunix Member

    Joined:
    Feb 4, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    What did you use to track the user down byuser/domain......looks like an advanced version of top. Please let me know as my server is experiencing high loads and I can't seem to track it down to one user

    Thanks
     
  5. AlexSmithMCP

    AlexSmithMCP Well-Known Member

    Joined:
    May 26, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    In WHM look under "Server Status" for "CPU/Memory/MySQL Usage" and that shows all the info that I was using. For me it lists all the domains and users and their top processes.

    Very handy. Dunno if it needs stuff compiled into Apache/PHP though so yea :)

    HTH
     
  6. quadrahost

    quadrahost Active Member

    Joined:
    Jul 17, 2003
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    I had the same problem and used mod_bandwidth to control it. The client was a bit upset about his transfer speeds after that and ended up cancelling service with me. I figured it was best to lose 1 customer over upsetting my entire client base because someone is abusive.
     
Loading...

Share This Page