If in the future the alarm can not ping the website, or the server load is too high, there are several ways to find the reason:
1, check the access log to see if there are access exceptions, such as, filter IP, IP encapsulation
Cat my.xoyo.com | awk ' {print $} ' | sort | uniq–c | sort–n >/tmp/ip.txt
Netstat-ntu | awk ' {print $} ' | cut-d:-f1 | sort | uniq-c | sort–n
2, check whether the network card has a serious packet loss phenomenon, ifconfig to see if dropped or error is constantly increasing, to determine whether the NIC problems.
netstat-n | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]} ' view the status of each phase of connection
syn_sent (Request connection) established (in communication) state is significantly more connected
Netstat-n | grep "established" |awk ' {print $} ' |sort |uniq-c|sort-nr
It is possible to exclude a Dos attack if the IP that is in this state is found to be native.
Ifconfig
check whether the dropped or error is increasing to determine if there is a problem with the NIC.
3, if the log always involves an item, see if there is a recent new activity or update to determine if there is a problem with the program code
4, the problem of the project to bind each of the relevant front-end machine, to see if access is normal, troubleshoot the server
5, see which programs or apps are taking up some of the high-load processes
Top
View system load and high resource-intensive processes
lsof–p PID Number
See which processes the PID is using
6, check the usage of main application port, such as PHP, whether it is occupied
lsof–i: Port
7, check the slow log of PHP, whether there is a program file timeout, frequent error
php-fpm.conf Opening a Php configuration file
Request_slow_log_timeout 10s
Set execution time-out
8, if the above find problems related to MySQL, see if MySQL maximum connection is too low
Show variables like ' max_connections ';
This article is from the "lake and Laughter" blog, reproduced please contact the author!
Slow website access, high server load-Find a problem method