XF 1.5 Extremely high CPU usage - don't want to get suspended again!

Cassandra

Member
Hi,

I have a xenforo+wordpress setup installation.
In the past month I started to notice a huge spike in CPU load. It mainly happens when I have around 400 users connected simultaneously, 75% of which are bots.
It was too much for my 2 CPU cores host and they simply suspended my account for exceeding the CPU usage limit.
So I moved to another host, this time with 4 CPU cores. And now I seem to be reaching the limit there as well !!!
I know for certain that xenforo is causing this, because when I make the board inactive CPU load goes down significantly.
From what I can surmise, forum/index.php is the main cause for high CPU load.
What steps can I take to reduce this load and improve efficiency?
Sever Error Log shows no errors.
Thank you
 
If you have 8 gb of ram or more that should be able to handle 400 users. 4 cores would be best. Strange that the load is going over. My guess is you have less ram then what is able to handle it. Some type of CDN may help out or getting something called Lightspeed installed which is a really nice addition to larger forums mainly best for VPS if the forum is having a lot of activity. There's also a really nice Xenforo add-on for lightspeed. I think they may also have one for Xenforo 1.5 though I'm not sure. You have to actually get lightspeed first to use the add-on but I hear it does wonders on helping out the load balancing with forums and speed as well.

If your in a budget I would get cloudflare as a free CDN and then install lightspeed but there could be something else going on you may want to have it looked into first. You never said how much RAM you had so I'm not 100% certain exactly what's going on here as you said 75% of them are bots. That would mean you had 100 users online. Just some helpful tips. There very well could be something on your server creating a higher load.

You could have someone that knows well about it take a look at what's been installed on your OS. Also are you using php 7? That would speed it up much more too. You'd be surprised. And you should upgrade to Xenforo 2 when you get a chance. That would also help
 
I have 4GB RAM with this hosting package but I don't think that's the issue. The issue seems to be processing power (please see the attached image):

I see I have something called "LiteSpeed Web Cache Manager" installed on my cpanel. The Xenforo addon you refer must be this one, however it requires "LiteSpeed Web Server(LSWS)". Is this the same? I read somewhere that caching isn't very relevant for shared hosting. Is this true?

I am using Php 7.
I will move to Xenforo 2 soon.
What logs should I provide for someone to look into?
 

Attachments

  • usage.webp
    usage.webp
    68.8 KB · Views: 20
I have 4GB RAM with this hosting package but I don't think that's the issue. The issue seems to be processing power (please see the attached image):

I see I have something called "LiteSpeed Web Cache Manager" installed on my cpanel. The Xenforo addon you refer must be this one, however it requires "LiteSpeed Web Server(LSWS)". Is this the same? I read somewhere that caching isn't very relevant for shared hosting. Is this true?

I am using Php 7.
I will move to Xenforo 2 soon.
What logs should I provide for someone to look into?

Lightspeed cache apparently is a plugin for light speed web server so you might already have it not sure. You'll have to check and see whether or not you actually have light speed web server. If it came with your hosting package then you may already have it and can set it up to further assist you. Also good to know your using PHP 7.

You should try finding the apache and php error logs not just the site error logs. Possibly there may be something else going on here as far as some type of script running on your site. Don't forget how vulnerable wordpess can actually be. It's well know for security holes. Depending on what version of wordpress your running I believe this may not be out of the realm of possibilities. Personally I myself do not know exactly what to look for when it comes to finding out the issue myself.

However I bet @Claudio from TODO10 may be able to help you. They specialize in server maintenance and migrated an old vb5 forum for me to xenforo back in 2013 i think it was. He stays around the forums and would probably give you a fair price to take a look on what's wrong with the site.
 
Thanks. I'm using the latest version of wordpress with the least plugins possible. I'm pretty sure its not wordpress because when I shut down the Xenforo board the CPU load falls.

What I did notice was that I get absolutely hammered by google bots. Currently I have 287 of them on my site! (alongside 11 members and 44 guests). The bots are very active. Are these numbers normal? I have about 13,000 threads and 300k messages.
 
However I bet @Claudio from TODO10 may be able to help you. They specialize in server maintenance and migrated an old vb5 forum for me to xenforo back in 2013 i think it was. He stays around the forums and would probably give you a fair price to take a look on what's wrong with the site.
Thank you for recommending us Brad. I'll start a conversation with @Cassandra and help her to troubleshoot this.
 
Thanks. I'm using the latest version of wordpress with the least plugins possible. I'm pretty sure its not wordpress because when I shut down the Xenforo board the CPU load falls.

What I did notice was that I get absolutely hammered by google bots. Currently I have 287 of them on my site! (alongside 11 members and 44 guests). The bots are very active. Are these numbers normal? I have about 13,000 threads and 300k messages.

I have a forum with about 1 million posts on it and we get a ton of bots from time to time. It was killing my server as well, something I already pay about $60 a month for through AWS. I’m on CloudFlare as well and have a bunch of caching options configured between that and the server. I’m also running nginx, which helped with speed but I was still having major CPU problems.

Here’s what helped me:

1. Add crawl rate limiting to your robots.txt file. Most bots will follow these, but make sure you look at which bots are affecting you and understand how those work with robots files.

2. If that doesn’t help, consider whether or not these bots are helping you or not. You may want to just block them by IP or hostname in CloudFlare.
 
Wow, this is crazy.
Upgraded to 4 CPU cores. Within a day, xenforo exceeds 400%. limit.
Upgraded to 6 CPU cores. Within two days, xenforo exceeds 600% limit, and I get a warning.
I know 1.5.24 is no longer supported but has anyone noticed such behavior in the past? I still have no idea what's causing this. Will upgrading to XF2.1 reduce CPU load?
 
Possibly, it is newer code. I also suspect you have some server configuration issues going on as well. Should have a system admin look into it.
 
Back
Top Bottom