MyBB Community Forums

Full Version: Large Threads Timing Out on Load
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, 

I run a relatively large gaming forum called Realms Beyond, and I am having a problem loading large threads. I'm not sure exactly the post count cutoff, but after a certain point a large enough thread will take too long and time out when loading. See this thread for an example. Details we have figured out:
  • This was a problem in 1.6, and has continued to be a problem in 1.8
  • Threads will always load fine if you are not logged in, but as soon as you log in the problem arises again. 
  • Occasionally these threads will load while logged in, but the majority of the time they will not, with no pattern we've seen so far. 
  • This problem is theme independent, it persists both with our custom theme and many top public themes for myBB 1.8. 
Any help would be greatly appreciated. For a test user, feel free to either register an account (that link is to the development fork of the website), or to use my test user with username 'brickbrickbrick' password 'brickbrick'. Let me know if you need anything else for testing. 

-BRick
The forum isn't loading for me.

Quote:SQL Error:2002 - Connection timed out
 
Have you considered it may be caused by your hosting?
Yeah, I also just had an instance where the forum main page wasn't wanting to load for me. It's working fine now though.

We have had occasional bouts of the forum as a whole not wanting to load, which I've been in talks with our hosting provider about. But that is rare, and the problem that I've described above definitely has happened many times on its own.

We don't hit the limits of our server resources, and I don't think the root of this is hosting problem.
(10-01-2016, 12:31 AM)LiveChief Wrote: [ -> ]maybe fix your sht https://developers.google.com/speed/page...ab=desktop

Well if you look at the non-development site the caching problems aren't there, just the server response time. Makes sense the cacheing is messed up cause Cloudflare isn't active on the development site. 

So the only issue is the server response time, which increases with larger threads but only when logged in. Is my only solution a cap on thread sizes or might there be a query that's causing this long delay or something?
First is the mybb_posts table using MyISAM storage engine? If it is, you really should switch to InnoDB because it allows row level locking rather than table locking which would occur anytime a write query is being executed on the table. Write queries are generated when someone makes a post, edits a post, a moderator performs any kind of moderator action on the post. Small forums this isn't generally a problem, but in larger forums you are getting frequent posts.

I'd also like to ask, what plugins are currently active?

You could also look into my Fast Search plugin which significantly reduced server load on a forum that had over 1 million posts that I had to help take care of for multiple years. With a lower server load, pages are more likely to be served than getting internal errors.
(10-02-2016, 01:10 PM)dragonexpert Wrote: [ -> ]First is the mybb_posts table using MyISAM storage engine?  If it is, you really should switch to InnoDB because it allows row level locking rather than table locking which would occur anytime a write query is being executed on the table.  Write queries are generated when someone makes a post, edits a post, a moderator performs any kind of moderator action on the post.  Small forums this isn't generally a problem, but in larger forums you are getting frequent posts.

Thanks for the tip! I wanted to say this worked, my website is now working properly across the board.
Thanks for the update. I'm glad it is working well again. Don't forget to mark the thread as solved.