SMF 2.0.19 - New Post succeeds but the browser returns error after multiple mins

Started by bhayward, August 16, 2025, 07:53:59 PM

Previous topic - Next topic

bhayward

I did not do the original installation of this SMF Forum but I am volunteering to help fix an issues we are seeing with posting to the forum.

Symptom is that when posting a new topic to the forum, the browser tab spins for minutes and then prints out an error from SMF.  Previously, that error was was related to having a mismatch schema to DB software.

I noticed was that we were running SMF 2.0.19 and the DB schema was 2.0.2.  I copied the upgrade.* files in and ran the upgrade.php through the browser.  No errors were reported and now DB schema reports the correct version.

However, I still get the long time to post. The post shows up but the browser shows the following error after about 2 minutes of processing:

Server has gone away
File: ..../public_html/forum/simple/Sources/Subs.php
Line: 3035

Line 3035 seems to be doing an update to smf_activity_log.
      $smcFunc['db_query']('', '
                UPDATE {db_prefix}log_activity
                SET' . substr($setStringUpdate, 0, -1) . '
                WHERE date = {date:current_date}',
                $update_parameters
        );

Table has 6,238 rows.
I have checked the table/ran repair on table - this did not solve the issue.
I have looked for locks using both standard and innodb method and do not see locks on the table.
Date for the most recent row in the DB seems to be accurate and recent.
Hosting provider is godaddy.

EDIT:  Just tried updating a row with the following command in phpMyAdmin:
update  smf_log_activity set topics=2 where date='2008-05-28'
It completed instantly.

Any suggestions on what to look for next?

Where can I find the server logs for the php execution errors?

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

bhayward

Appreciate the comments, everyone.

I do not see any custom mods under ADMIN -> MAIN -> Package Manager -> Installed Packages.  I only just started helping to manage the site so I don't know of the entire history here.

Oddly enough, the problem only happens when posting new topics and it happens every single time someone posts a new topic.  The browser spins for minutes (I assume until the mysql timeout) and then returns "Server has gone away".  But the post is published and available for browsing from another tab very quickly (well before it times out).   Also - views and comment counts do update properly it seems.  (This is the table that appears to be having issues)

Note that editing an existing post and saving it does not reproduce this error. (even one you just made that reported this error)

Does not appear to be using pooling - and if so, I wouldn't think it would be a 100% of the time error if pooled connections just got stale.  I don't think increasing the timeout is a fix (it will just wait longer before failing).

Easiest thing to try is to upgrade to 2.1.6 it seems.  If I don't get any additional suggestions in the next week, I'll probably start there.

I hear you regarding godaddy.  I'll talk to the folks who manage the details for the website.  What are the recommended alternatives?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: