Advertisement:

Author Topic: Database timeout when approving members  (Read 243 times)

Offline Count

  • Semi-Newbie
  • *
  • Posts: 36
  • Gender: Male
Database timeout when approving members
« on: December 19, 2017, 12:57:17 PM »
Recently after updating to 2.0.15 we noticed a problem when approving new members with "approve and require activation".

MySQL server has gone away
File: /var/www/xxx/public_html/Sources/ManageMembers.php
Row: 1285

I tried to find the error in logs but couldn't find anything, which was explained by...

Code: [Select]

                $smcFunc['db_insert']('',
                        '{db_prefix}log_actions',
                        array(
                                'log_time' => 'int', 'id_log' => 'int', 'id_member' => 'int', 'ip' => 'string-16', 'action' => 'string',
                                'id_board' => 'int', 'id_topic' => 'int', 'id_msg' => 'int', 'extra' => 'string-65534',
                        ),
                        $log_inserts,
                        array('id_action')
                );

Row 1285 is the array('id_action') so it isn't all that surprising that it won't log anything if it errors out while logging. Additionally the member that was approved is still shown in the header "There are 2 members waiting for approval" when there's only 1 waiting when you click the message. ManageMembers.php was changed for 2.0.15 (from 2.0.11?)  but the change is nowhere near that error.
The problem is mostly cosmetical and annoying as the members do get approved, but it'd be nice to be able to fix it.


Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 17,405
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Database timeout when approving members
« Reply #1 on: December 21, 2017, 12:25:39 PM »
Depending on your host, this might be an issue you are unable to fix yourself. "MySQL server has gone away" basically says that your DB cut off communications.
You may want to ask your host about this.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"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

Offline Count

  • Semi-Newbie
  • *
  • Posts: 36
  • Gender: Male
Re: Database timeout when approving members
« Reply #2 on: January 03, 2018, 06:43:48 AM »
DB is fine, everything else is ticking smoothly but that query just times out. So it isn't/shouldn't be a DB problem as it's unchanged from 2.0.14 which didn't have this issue (but some others).

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 17,405
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Database timeout when approving members
« Reply #3 on: January 04, 2018, 03:22:49 AM »
What other issues did you have before this? When that happens, if not your forum error log, then does your server error log get anything about it?
Like I said, the error is basically a MySQL error. https://dev.mysql.com/doc/refman/5.6/en/gone-away.html
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"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