1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Server Configuration and Hosting' started by PXB, Nov 18, 2014.

  1. PXB

    PXB Member

    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...


  2. Slavik

    Slavik XenForo Moderator Staff Member

    Has your addon usage changed? How about bots on the site?
    LPH likes this.
  3. LPH

    LPH Well-Known Member

    Are you sure this is due to XenForo? I'd suspect WP over XF ..

    Step One:
    Install P3, activate, have it scan, and it'll tell you if something in WP is causing a problem.


    Step Two:
    Are you running a cron job that is backing up WP or doing something else?
  4. PXB

    PXB Member

    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.

    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..

  5. Brogan

    Brogan XenForo Moderator Staff Member

    Disable all add-ons and check again.
  6. PXB

    PXB Member

    Tapatalk is the only installed addon. its off now, let's see..
  7. MattW

    MattW Well-Known Member

    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?
  8. PXB

    PXB Member

    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...
  9. Claudio

    Claudio Well-Known Member

    Do you want me to have a look at this?
  10. RoldanLT

    RoldanLT Well-Known Member

    I'm sure @MattW can take care of it.
  11. Xon

    Xon Well-Known Member

    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.
  12. PXB

    PXB Member

    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 :()
  13. WSWD

    WSWD Well-Known Member

    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.
    Xon likes this.
  14. rainmotorsports

    rainmotorsports Well-Known Member

    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.
    Xon likes this.
  15. MattW

    MattW Well-Known Member

    You should also make sure your wordpress site isn't being subjected to a brute force on your wp-admin page.
    Biker, LPH and Xon like this.
  16. Jim Boy

    Jim Boy Well-Known Member

    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
  17. Biker

    Biker Well-Known Member

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

Share This Page