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.

Server keeps going down, don't know why

Discussion in 'General Discussion' started by damian-d, Jan 9, 2017.

  1. damian-d

    damian-d Member

    Joined:
    Apr 17, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    cPanel Access Level:
    Root Administrator
    Code:
    /etc/redhat-release:CloudLinux release 7.2 (Valeri Kubasov)
    /usr/local/cpanel/version:11.58.0.37
    /var/cpanel/envtype:standard
    CPANEL=release
    Server version: Apache/2.4.23 (Unix)
    Server built:   Oct 24 2016 04:26:57
    Cpanel::Easy::Apache v3.34.7 rev9999 +cloudlinux
    PHP 5.6.27 (cli) (built: Oct 24 2016 04:29:11)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
        with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.1, Copyright (c) 2002-2016, by ionCube Ltd.
        with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
    mysql  Ver 14.14 Distrib 5.6.33, for Linux (x86_64) using  EditLine wrapper
    in short, my server keeps going down.

    i have support from an organisation listed in another forum here but they have come to the conclusion after a few scans and checking error logs that they don't seem to know what is wrong - there are no high loads or anything and they've performed a few scans and nothing is jumping out at them or i think they'd be telling me

    there is also no apparent set time of the day that server goes down, no every 6 hours or every 2am but it is dropping atleast once a day and sometimes 2 or 3 times

    i was wondering if anyone knows of anything i can be doing to monitor why it just drops or if from the information above you can see anything that i should upgrade or ...

    thanks
     
  2. damian-d

    damian-d Member

    Joined:
    Apr 17, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    cPanel Access Level:
    Root Administrator
    I should also say that when the server is rebooted it stays up for a few hours or a couple of days, but it just drops again. but always without warning.
     
  3. NOC_Serverpoint

    NOC_Serverpoint Well-Known Member

    Joined:
    Jul 3, 2016
    Messages:
    102
    Likes Received:
    6
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    Hi,

    It is best suggested to setup a monitoring script to sent you alert emails if the server load increases.
    Code:
    ===================================
    #!/bin/bash
    
    ;We set a trigger for how high the load can get before we're
    ;alerted via e-mail from this script.
    trigger=4.00
    
    ;We set a load variable to read the current server load from
    ;/proc/loadavg and only from the first column which is the live load.
    
    load=`cat /proc/loadavg | awk '{print $1}'`
    
    ;We set a response variable to the word "greater" if the current
    ;load is greater than our trigger that we set.
    
    response=`echo | awk -v T=$trigger -v L=$load 'BEGIN{if ( L > T){ print "greater"}}'`
    
    ;If the response is set to "greater" we run the sar -q command
    ;and pipe | that data to the mail command for recipient@example.com
    ;this sends an e-mail with the server's recent load averages there.
    
    if [[ $response = "greater" ]]
    then
    sar -q | mail -s"High load on server - [ $load ]" recipient@example.com
    fi
    ===================================
    
    And setup a cron job for this bash script to run periodically.
    */5 * * * * bash "script location"

    Hope this helps to identify the issue.
     
    #3 NOC_Serverpoint, Jan 9, 2017
    Last edited by a moderator: Jan 11, 2017
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,171
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The /var/log/messages and /var/log/dmesg log files are useful logs to review when attempting to determine why a system is rebooting. You may also want to consult with your data center to verify no hardware issues are resulting in the reboots.

    Thank you.
     
Loading...

Share This Page