AWS: Xenforo+Wordpress hit 100% in a medium instance

PXB

Member
Hi..
I used to run a m3.medium instance with Xenforo and Wordpress (without any integration) that floats between 30-50% CPU Utilization..

Last week a got an alert that my instance hit 100%, and since than the CPU is always nearly the maximum capacity, resulting in a very slow navigation around the site.

My board has 400k post and 10k users, with avarege of 50 (from analytics) simultaneosly online.

Given that I had no significant increase in traffic in the period, what would be the solution to this? Moving to a larger instance certainly would solve this, but I wonder if there is something wrong...

aws_CPU.jpg


aws_CPU.jpg
 
Has your addon usage changed? How about bots on the site?
No, nothing change.. no new addon or plugin.
About the bots, they were like 50% (sometimes more) of the visitors, according to Xenforo. But now I made that "Baidu block" and I even blocked the Google Bots to almost zero... and the problem still happens.

Are you sure this is due to XenForo? I'd suspect WP over XF
When I turn off the boards the CPU Utilization falls to below 20%.. That's why I think it's Xenforo.
No backup or other job different from the usual..



Another detail that I noticed is the bandwidth. The total data transfer out was about 150GB/month. Now in november it's already on 380GB, and still has 10 days to end month.
And the most impressive one is this "regional data transfer - in/out/between EC2 AZs or using IPs or ELB". I will put the values of the previous months:

May (Vbulletin5) - 0.508 GB (very low interactions between users due to the terrible VB5)
June (Xenforo migration) - 745 GB
July - 180 GB
August - 452 GB
September - 1,324 GB (!!!)
October - 1,811 GB (!!!!)
November (19 days) - 1,804 GB (!!!!!)

Any clues?
This is from today. Note that soon the users begins to access the site by the morning the CPU goes crazy high..

aws_CPU.jpg
 
Does the EC2 instance have access logs available (is it just a linux install)? I'd start by checking those out and see if you can see a spike in access requests?
 
Well, it doesnt work.. The CPU is with 100% for about 45minutes..
Is there anyone here who I can pay to try to solve this? I'm not an expert and I'm feeling that this is more complex than I thought...
 
Well, it doesnt work.. The CPU is with 100% for about 45minutes..
Is there anyone here who I can pay to try to solve this? I'm not an expert and I'm feeling that this is more complex than I thought...
Hi!
Do you want me to have a look at this?
 
It sounds like you've got a lot of requests hammering the site.

I'ld recommend check your webserver logs to get a handle on the request volume. Then Running 'top' and see if it is MySQL or php/webserver which is showing up the most.
 
I rebuild the enviroment with an old version of Wordpress and now with the new 1.4.3 Xenforo.
From last night to this morning the average is about 70%, with a single peak of 90%.

I'll keep the monitoring through all the day. Thanks for the recommendations, I will contact if the problem reappears (which I think is very likely :()
 
I rebuild the enviroment with an old version of Wordpress and now with the new 1.4.3 Xenforo.
From last night to this morning the average is about 70%, with a single peak of 90%.

I'll keep the monitoring through all the day. Thanks for the recommendations, I will contact if the problem reappears (which I think is very likely :()

What exactly are you doing to monitor, aside from just looking at a useless graph? That graph isn't going to tell you anything besides that the CPU is being used. Start with top -c and see what is actually using the CPU.
 
  • Like
Reactions: Xon
You really do need to find out what exactly is causing the usage. As WSWD says take a look at the process list. You are normally going to find most of the usage in the php handler which then means finding out if there is any particular file slamming the CPU. It can be fun.

If its just general over capacity I know that OpCache took down my CPU usage and in certain scenarios doubled the user capacity of the VPS I am running. There are all sorts of things to cause load. As one member pointed out to me his site had a huge load from bbcode heavy threads. So if something isn't wrong it will end up being time to look at mitigating the CPU usage or increasing capacity.
 
  • Like
Reactions: Xon
Firstly I'd ask what AWS instance you are using, and any other configuration, eg type of volume, services being used etc. The fact that you are getting "regional data transfer" costs sets off alarm bells - unless you are hyper about getting that extra .1% uptime you dont do multi-az. I'm happy to have a closer look at the site to troubleshoot. FWIW I run a very large XF installation on AWS, that also has uses wordpress, as well as having AWS quals so I have dealt with these sort of issues alot in the past
 
You should also make sure your wordpress site isn't being subjected to a brute force on your wp-admin page.

Yep. I've noticed a sharp uptick in script kiddies trying that route. What's hilarious is I don't even run wordpress. :D
 
Back
Top Bottom