News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Database timeout when approving members

Started by Count, December 19, 2017, 12:57:17 PM

Previous topic - Next topic

Count

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.


Aleksi "Lex" Kilpinen

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

Count

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

Aleksi "Lex" Kilpinen

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

Advertisement: