...

View Full Version : Code looping using 700% CPU



TheUpcoming
02-23-2012, 09:56 AM
Hello everybody,

This is my first post on the forum and I hope I can seek the interest and support of people who know a bit more than me about codes..

I have started a website a few months ago for my magazine, it's www.theupcoming.co.uk

I used a Wordpress base and customised the graphic style. Yesterday at 6PM GMT our hosting provider has suspended the website claiming this:

Your site has just caused a massive service outage on the shared cloud, see below, it was using 63GB RAM and 700% CPU.

Has anything been changed on the site today? This caused service disruption for 64,000 other customers domains.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25747 theupcom 16 0 1254m 883m 6088 R 8.9 5.5 0:18.17 httpd
25779 theupcom 16 0 1241m 870m 6128 R 8.9 5.4 0:15.36 httpd
29967 theupcom 15 0 1240m 869m 5620 S 8.4 5.4 0:02.93 httpd
28350 theupcom 16 0 1253m 882m 5852 S 7.8 5.5 0:05.96 httpd
23626 theupcom 15 0 1257m 885m 6832 S 7.3 5.5 0:22.68 httpd
24008 theupcom 16 0 1246m 873m 6352 R 7.3 5.5 0:21.05 httpd
25734 theupcom 16 0 1241m 870m 5796 R 7.3 5.4 0:16.35 httpd
23665 theupcom 15 0 1256m 883m 6892 S 6.8 5.5 0:19.68 httpd
24241 theupcom 15 0 1253m 882m 6352 S 6.8 5.5 0:20.23 httpd
25750 theupcom 15 0 1255m 885m 6512 S 6.8 5.5 0:16.45 httpd
25907 theupcom 15 0 1258m 885m 5948 S 6.8 5.5 0:16.41 httpd
25911 theupcom 15 0 1250m 879m 6324 S 6.8 5.5 0:12.85 httpd
25913 theupcom 15 0 1245m 874m 6204 S 6.8 5.5 0:12.85 httpd
23651 theupcom 15 0 1260m 889m 6372 S 6.3 5.6 0:21.66 httpd
25874 theupcom 15 0 1246m 873m 6036 S 6.3 5.5 0:15.15 httpd
25879 theupcom 15 0 1246m 873m 6312 S 6.3 5.5 0:18.34 httpd
25890 theupcom 15 0 1246m 876m 6920 S 6.3 5.5 0:14.85 httpd
16339 theupcom 16 0 1249m 878m 7892 R 5.7 5.5 0:47.87 httpd
21547 theupcom 15 0 1246m 877m 7928 S 5.7 5.5 0:38.78 httpd
25739 theupcom 16 0 1256m 885m 5900 R 5.7 5.5 0:12.72 httpd
24084 theupcom 15 0 1245m 874m 6588 S 4.7 5.5 0:17.59 httpd
25909 theupcom 16 0 1241m 870m 5752 R 4.7 5.4 0:13.05 httpd
27766 theupcom 15 0 1243m 872m 5944 S 4.7 5.4 0:10.91 httpd
19511 theupcom 16 0 1268m 898m 9148 R 4.2 5.6 0:43.79 httpd
22456 theupcom 15 0 1255m 882m 6712 S 4.2 5.5 0:27.93 httpd
24126 theupcom 16 0 1246m 876m 6488 R 4.2 5.5 0:20.53 httpd
24178 theupcom 16 0 1269m 898m 6344 R 4.2 5.6 0:18.64 httpd
25808 theupcom 15 0 1266m 895m 6228 S 4.2 5.6 0:16.19 httpd
25908 theupcom 15 0 1246m 874m 7336 S 4.2 5.5 0:16.93 httpd
23718 theupcom 16 0 1250m 880m 6704 R 3.7 5.5 0:21.09 httpd
24056 theupcom 15 0 1244m 873m 6576 S 3.7 5.5 0:16.49 httpd
24085 theupcom 16 0 1263m 892m 6268 R 3.7 5.6 0:19.51 httpd
24236 theupcom 15 0 1251m 881m 6248 S 3.7 5.5 0:17.78 httpd
26280 theupcom 16 0 1244m 873m 5820 R 3.7 5.5 0:11.01 httpd

We then exchanged a few more emails and they told me to check the access / error log but I did not find anything strange (at least to me) there.

They also said: it was showing the local IPA hence the code was looping;

Do you know what we are talking about and what could I do to sort the issue? Thank you a lot!

myfayt
02-23-2012, 02:14 PM
It could be a loop trying to generate thousands of records over and over, a non-ending loop. Could be a security flaw in your coding, could be a spam bot accessing something over and over.

Does any certain pages take forever to load or at least a long lag?

felgall
02-23-2012, 09:10 PM
Do you have one of the caching plugins for WordPress installed? If not then installing one of them might help since they produce static copies of requested pages so that the script to generate a given page only needs to run once every few hours instead of once for every request to view the page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum