jamesh wrote: ↑
Tue Oct 30, 2018 10:45 am
You will hopefully have noticed that the forums is now behaving itself. The eagle eyed amongst you will have noticed that the "Number of users online" section at the bottom of the index page has disapeared. It appears we have been suffering from this https://www.phpbb.com/community/viewtopic.php?t=2124014
issue which was soaking up >80% of the forum server performance just to work out the number of users online.
Not sure if a blog post fully explaining things will appear, but for now, we* have hacked phpbb to get rid of the problem, so the forum should be a LOT faster, and now capable of about 10 times the throughput prior to the issue appearing.
Interesting that this phpbb issue was reported in 2011. And has never been fixed.
*we != me. This is way out of my area of expertise.
That does look like a pretty staggering performance bug in phpbb: a piece of code in every page that causes the database to do a full table scan every time the page is accessed. I'm guessing the fix is to just rip out the code that tries to count the number of online users, which is not really something you need on the front end, although in the admin interface it might still be useful. Although, a quick read of the MySQL docs (https://dev.mysql.com/doc/refman/5.6/en ... type_range
) suggests that it can actually use indexes for range queries, so perhaps the timestamp column is not indexed.
I hope the developers of phpbb are a bit more on the ball when it comes to security