Server keeps going down, don't know why

damian-d

Member
Apr 17, 2016
8
0
51
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
 

NOC_Serverpoint

Well-Known Member
Jul 3, 2016
103
7
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 [email protected]
;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 ]" [email protected]
fi
===================================
And setup a cron job for this bash script to run periodically.
*/5 * * * * bash "script location"

Hope this helps to identify the issue.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
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.