MyBB Community Forums

Full Version: Forum lag issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Once every 10 page loads or so, my forum hangs upon loading, taking several seconds to serve a new page when usually it's almost instant. It happens randomly---some days it's fast and other days the hanging happens more frequently (once every 5 page loads).

When one page hangs and I click another page, it will then load instantly again. It's very random. I have the forum on a VPS (2 cpus) and the server load is usually low.

Here are two screenshots of the troubleshooting numbers when a specific page takes a while to load:

[Image: AuyQS9D.png]

[Image: MNlfVw6.png]

And here are the numbers when a page loads normally:

[Image: 0KV6n2K.png]

Any suggestions?
Change your webhost.
Don't blame the script.

If you look closely at one picture you see that the mysql server is under heavy load.
When one is using shared webhosting, one must understand that every account has limited resources.
My advice, find a webhost with php 5.4 and mysql 5.5.
Both php 5.2 and 5.3 are EOL.
1. I'm not blaming the script, just looking for ideas on what the problem is.

2. I have a VPS, as stated in the original message. It's not a shared hosting environment.

3. If the mysql is under heavy load, how can I narrow down the cause?
If you hit "advanced details", you can see the queries which are taking the most time. If they all take a relatively long time amount of time to execute, consider tuning your my.cnf file.
My advice: php-fpm(php 5.4), nginx, apcu+zendop(pecl is your friend), mysql 5.5.

When using vps, I personally recommend kvm (with ssd if you want top i/o speed for your mysql queries).

If you don't mind, I would like you to share some intel:
1. Ram/cpu specs ?
2. my.cnf content ?
3. Apache/nginx ?
4. Other things you think would best for me to know ?
(2013-08-11, 08:22 PM)Nathan Malcolm Wrote: [ -> ]If you hit "advanced details", you can see the queries which are taking the most time. If they all take a relatively long time amount of time to execute, consider tuning your my.cnf file.

Here is the advanced details on one of the slow page loads:

http://i.imgur.com/kk7V9PP.png

(2013-08-11, 08:28 PM)set3sh Wrote: [ -> ]My advice: php-fpm(php 5.4), nginx, apcu+zendop(pecl is your friend), mysql 5.5.

When using vps, I personally recommend kvm (with ssd if you want top i/o speed for your mysql queries).

If you don't mind, I would like you to share some intel:
1. Ram/cpu specs ?
2. my.cnf content ?
3. Apache/nginx ?
4. Other things you think would best for me to know ?

1. 3.4ghz, 2304mb ram.
2. http://pastebin.com/TuHN71uX (it didn't seem to paste correctly)
3. Apache
4. Forum runs fine otherwise. Just these lag issues.

PHP version 5.2.17
MySQL version 5.1.70-cll
try disable forum jump and Possibly Related Threads
Are you sure that all of the server software is up to date? That might make a big difference if you are using EOL software.

Also, what does the general RAM usage look like, and what are your general prefork tuning settings for apache (assuming you're using prefork)? It is also possible that Apache just needs some tuning. I usually recommend nginx instead, but if it's just a matter of tuning, that can be fixed either way.
oO Fire that man who set your server.
I'm making a wild guess: no firewall?

Anyway:
1. http://dev.mysql.com/doc/refman/5.1/en/ (I can't tune your server for you because you only have access to it)
2. Kill apache and install nginx
3. Install php 5.4 (the dev team guarantee a 25-30% script execution performance improvement)
4. Memcache / Varnish / APCu+ZendOP / eAccelerator (will speed up your forum, but I prefer APCu+ZendOP)
5. Setting a firewall/IDS is a must on any server.