I have found the code snippet that routinely hangs during a post operation. It is at line 1091 in /libs/ubbthreads.inc.php -

while(list($views,$view_topic) = $dbh->fetch_array($sth)) {
$query = "
update {$config['TABLE_PREFIX']}TOPICS
set TOPIC_VIEWS = TOPIC_VIEWS + $views
where TOPIC_ID = ?
";
$dbh->do_placeholder_query($query,array($view_topic),__LINE__,__FILE__);
}

This looks like it's doing a loop through an array and doing a series of updates against the topic table. My BellaOnline topic table has 102887 rows in it. I'll note that it is now an InnoDB table, so I absolutely understand this could be an InnoDB specific issue in terms of tuning. That's fine.

So if this operation is looping around and around, continually hitting the large Topic table, it makes sense that it could be locking up during that. That's even "worse" than the situation I thought it was, where it was just an insert-than-update on the Topic table.

I'm curious, what type of a page would a visitor be on where it would "count" as them having seen multiple topics, to then require it to increment the counter on multiple topics all at once? In my forum layouts I see just one topic's posts at a time. I look at the Blue Origami Sweepstakes thread, and then I go look at the Origami Flowers sweepstakes thread. So it would only be updating one post view count at a time.

I.e. just in case this flush_log update doesn't work, I'm looking at what I can temporarily code around so my posting stays functional for the coming weeks until I can examine potential hardware upgrades.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts