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.

Optimising Dedicated Server for Shared Hosting?

Discussion in 'Workarounds and Optimization' started by Forcerdj, Feb 27, 2014.

  1. Forcerdj

    Forcerdj Well-Known Member

    Joined:
    Nov 30, 2009
    Messages:
    60
    Likes Received:
    1
    Trophy Points:
    8
    Hi,

    So i've recently changed hosts and upgraded my server so that i can delve into the world of web hosting... all was going good until tonight i noticed some sites unresponsive, i couldn't get into WHM so i logged i via SSH which was slow, the monitoring tool said CRITICAL as server load was through the roof.

    I restarted Apache from the command line and everything normalised in seconds.

    I don't want to start advertising and getting clients when server could spike at anytime and knock websites offline. What happens if sever hits CRITICAL again and we're not around to correct it.

    General server usage at the moment is extremely low, as of writing this load is 0.2 (8 CPUs) and memory 16.17%, Swap 7.69%.

    I'm wondering how i can avoid this in the future? Optimise the server so that it can better handle the load, or put something in place that kills the process if it gets to dangerous levels?

    Any help appreciated, thanks :)
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    Perhaps you'll want to first see what the cause of the load is. Next time it gets like this, SSH in and run 'top' to see if anything sticks out. The Daily Process Log in WHM might also show you what's going on.
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    When load spikes like that, there's a reason for it. Optimizing services is certainly helpful, but your server can still run into trouble regardless of how well its optimized if there's any accounts on the server running out of date scripts and possibly being attacked, for example, a very common thing these days.

    You may find this troubleshooting thread useful:
    Troubleshooting high server loads on Linux servers - cPanel Forums

    My guess, somethings wrong with one of your sites, somewhere.

    Do you have ConfigServer Firewall installed? Properly configured, that will give you lots of help keeping things on your server in line, and will alert you by mail about many things on a regular basis.
     
  4. Forcerdj

    Forcerdj Well-Known Member

    Joined:
    Nov 30, 2009
    Messages:
    60
    Likes Received:
    1
    Trophy Points:
    8
    Thanks for the replies, the offending website is an old installation of vBulletin so it's highly likely it's poorly optimised or a is a big target for attacks.

    It's a large site with 3GB database so upgrading has always been brushed aside but i think i will bite the bullet over the weekend.

    This morning i had a similar sever load issue, again with the vbulletin account.

    Code:
    Time:          Fri Feb 28 02:46:23 2014 +0000
    Account:       vbulletin
    Process Count: 50 (Not killed)
    
    Process Information:
    
    User:vbulletin PID:27145 PPID:26099 Run Time:42(secs) Memory:272848(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/vbulletin/public_html/photos/displayimage.php
    ...x50
    
     
Loading...

Share This Page