High traffic, site unresponsive
http://whatiread.fyi/test.html
When these problems occur, Linode's dashboard tells me that the CPU usage and network traffic are unusually high. I can't imagine that 100kbps sustained for an entire day is legitimate traffic; what it's showing for the last couple of hours is more reasonable. What can I do to identify and stop this problem?
~~http://i.imgur.com/dSKQAO6.png
Thanks.~~
8 Replies
Regarding network traffic, look in your Apache logs to see where it's coming from. Likely candidates are search engines. If they are generating more traffic than you want, then the well-behaved ones can be dealt with by creating a robots.txt
Does anyone have any more ideas?
"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.2 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
93.174.93.234 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.31 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.2 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
93.174.93.234 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.31 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.2 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
93.174.93.234 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.31 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.2 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
93.174.93.234 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.31 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.2 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
93.174.93.234 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.31 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.78 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.2 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
93.174.93.234 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.31 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.78 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.2 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
93.174.93.234 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.31 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.78 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.2 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
93.174.93.234 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.31 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.78 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.2 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
93.174.93.234 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.31 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.51.216 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
94.102.49.78 - - [11/Feb/2016:11:17:14 -0500] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
Apparently, getting 403 responses doesn't slow down their attempts. But while traffic is still high, CPU usage is way down, and the site's loading time doesn't seem to be impacted. So I think I'm going to call this a win.
Thanks for the help!
A few things that can be done that should help
First you can hunt down there are a few php bytecode generators, or php caching, such as APC.
Second reduce and clean up the number of modules loaded in apache and php to what is needed, there are a large number of modules loaded that will cause this to be high, and because of PHP is not thread safe you are probably running in worker mode, which means you have multiple copies of Apache being loaded into memory. By default both can draw a great deal of memory
Third, you can run php through FastCGI instead of Modphp, this would allow you to move apache to a threaded model.
Lastly, you can try other web servers such as nginx, you may find better performance, since Nginx only runs threaded and uses fastcgi for php