Advertisement:

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

Offline Count

  • Semi-Newbie
  • *
  • Posts: 34
  • 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

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,941
  • Gender: Male
  • The Artist Formerly Known as LexArma
    • 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.
Finnish Native Language Support Specialist & Former (Lead) Support Specialist

Offline Count

  • Semi-Newbie
  • *
  • Posts: 34
  • 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

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,941
  • Gender: Male
  • The Artist Formerly Known as LexArma
    • 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
Finnish Native Language Support Specialist & Former (Lead) Support Specialist