Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Count on December 19, 2017, 12:57:17 PM

Title: Database timeout when approving members
Post by: Count 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...



                $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.

Title: Re: Database timeout when approving members
Post by: Aleksi "Lex" Kilpinen 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.
Title: Re: Database timeout when approving members
Post by: Count 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).
Title: Re: Database timeout when approving members
Post by: Aleksi "Lex" Kilpinen 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