MyBB Community Forums

Full Version: Long threads can hardly be opened since MyBB upgrade (to 1.2.12)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

we recently upgraded our version of MyBB from 1.2.7 (or so) to the new 1.2.12 (German localized version). Actually we did a MyBB install from scratch, so "just" the database kept.

After that we noticed, that ... several bugs have gone which is great. :-)

However, we also noticed that threads with many posts where the posts are longer (10+ KB), it takes 10 seconds and more to open the thread, ie the first page of the thread. Oftenly the server stops with a timeout error message.
This is with standard number of posts per page (=10 posts). In case I dare to increase the posts per page number to 30, the thread can't be opened anymore.
This slowness doesn't happen for "small" threads (ie threads with either just a few posts or with very short posts).


For example, a thread with 39 posts and each of them is about 15 KB. There are 4 pages. I enter the thread (1st page) and the small debug info on the bottom right part says:
Quote:Generated in 15.5910769 seconds (99.94% PHP / 0.06% MySQL)
MySQL Queries: 16 / Global Parsing Time: 0.0907409
PHP version: 5.2.0 / Server Load: 3.51 / GZip Compression: Enabled

For the second page it improves:
Quote:9.2104909 seconds (99.86% PHP / 0.14% MySQL)
MySQL Queries: 17 / Global Parsing Time: 0.0850379
PHP version: 5.2.0 / Server Load: 8.11 / GZip Compression: Enabled

Again for page 3:
Quote:Generated in 6.3836312 seconds (99.60% PHP / 0.40% MySQL)
MySQL Queries: 16 / Global Parsing Time: 0.3891921
PHP version: 5.2.0 / Server Load: 7.5 / GZip Compression: Enabled

and best for page 4:
Quote:Generated in 2.9697940 seconds (99.34% PHP / 0.66% MySQL)
MySQL Queries: 16 / Global Parsing Time: 0.0939159
PHP version: 5.2.0 / Server Load: 6.39 / GZip Compression: Enabled

Is it normal that the server spends >99% of the time in the PHP scripts but only <1% in the database?

This extreme slowness is new and just happened after we upgraded MyBB.
Then we converted the database table from latin1_swedish (or so) to UTF-8, like the MyBB Readmes suggest. But with not effect to the slowness.
(All the tables are now in UTF-8_general or so. We've done the conversion manually in phpMyadmin, because when we used the MyBB tool in the Admin-CP, it did cut all our table text fields which contained special chars right at the 1st special char. But since the tables are converted now, this doesn't matter, isn't it?)

We also updated PHP 4.x to PHP 5.2 but with no effect, unfortunately.


What's going on with my long threads? How could I find out the hot spot?
Thanks a lot.
Are you using any plugins or modifications?

Also your server load seems quite high. Which host are you using? Are other parts of your site slow? Are any other people on the server complaining about the slow speed?
DennisTT Wrote:Are you using any plugins or modifications?
Dennis, we have got these two plugins in use:

* http://mods.mybboard.net/view/google-analytics
* http://mods.mybboard.net/view/email-noti...gistration

Furthermore after upgrading I had to edit four templates like you suggested here:
RE: CANNOT LOGOUT? READ THIS!
If you are using MyBB 1.2.8 or later (already have &sid=xxxx in URL)


Quote:Also your server load seems quite high. Which host are you using?
It's a (cheap) shared server, but the load has always been that high for us (ie when we used MyBB 1.2.<10) and the threads I mentioned just took 2-3 seconds to open in the past, so everything worked with acceptable response time.

Quote:Are other parts of your site slow?
We just run the MyBB forum in our shared server space, and aside the "long / large posts threads" problem the forum is very responsive! Ie all the threads with either many short posts or only a few longer posts load fast, even if there are several people on board.

Quote:Are any other people on the server complaining about the slow speed?
Yes, I usually check with one or two other people at the same time and we all encounter the very same problem.

Is there any MyBB switch or Admin-CP configuration I could enable to see what causes the problem?
Disabling gzip didn't help.

I guess it's not the database?

Thanks!


P.S. please find attached a "MyBB Debug Information" (some IP info replaced with xxx and yyy) and phpMyadmin Db-structure.
The debug information suggests that the problem lies in the PHP execution as it takes up 99% of the generation time (MySQL querying only takes less than 1% of the time)

Do you have many smilies installed by any chance?
...if you have a large number of smilies, badwords or custom MyCodes, I would try removing a few to see if things speed up.
Hi and thanks for the replies!

DennisTT Wrote:The debug information suggests that the problem lies in the PHP execution as it takes up 99% of the generation time (MySQL querying only takes less than 1% of the time)
Thanks for the confirmation of what I suspected, too.

Quote:Do you have many smilies installed by any chance?

I think just the default ones, but the mentioned problematic threads use no smilies.

ZiNga BuRgA Wrote:...if you have a large number of smilies, badwords or custom MyCodes, I would try removing a few to see if things speed up.
We've got no badwords and no custom MyCodes.

However, we've enabled HTML for the forum, and the problmatic threads use HTML code to format the text (like italics, bold, links, etc).

Is this the problem, maybe?

Should I point you to an example of the problematic thread(s)?


What I don't get: with the problematic threads, why does typically "just" the first page cause server timeouts, whereas the second (and so on) page loads well? (the page 2 etc. has got a comparable amount of comparable long posts.)
PHP is an interpreted language. Every page must be compiled down when the request is sent to server (this is the CPU use you see). But after the first request, much of what is needed to simply process the next page is in RAM ... making the next much quicker.

I would suggest tweaking the memory cache settings of PHP, and perhaps install eAccelerator.
georgia_tech_swagger Wrote:PHP is an interpreted language. Every page must be compiled down when the request is sent to server (this is the CPU use you see). But after the first request, much of what is needed to simply process the next page is in RAM ... making the next much quicker.
Thanks for the info.

However, until we upgraded to the current MyBB version, also the 1st pages loaded very fast in the very same threads. So what has been changed so that now they take 10++ seconds to load?

Quote:I would suggest tweaking the memory cache settings of PHP, and perhaps install eAccelerator.
I don't know these yet, but will have take a look at.
What's the URL to your forum?