Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
WordPress database error MySQL server has gone away for query UPDATE wp_sftrack
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Mar 27, 2013 - 6:59 am

I am seeing the above mentioned error message in my log for the past several weeks, at least since the beginning of March (no prior log as I had to do a clean out). I am on a quite powerful VPS running multiple WP instances. This one is the only MySQL warning I am getting across all instances and only for Simple Press, specifically wp_sftrack (no other queries generating errors).

Here's the entire error message:

[26-Mar-2013 21:41:13] WordPress database error MySQL server has gone away for query UPDATE wp_sftrack
               SET notification='a:2:{i:0;i:1;i:1;s:22:"Invalid database query";}'
               WHERE id=136959 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/paperpunch_pro_MWA/no-sidebar.php'), the_content, apply_filters('the_content'), call_user_func_array, sp_render_forum, sp_process_template, sp_load_template, include('/sp-resources/forum-themes/byw/templates/spGroupView.php'), sp_load_template, include('/sp-resources/forum-themes/byw/templates/spFoot.php'), sp_AllRSSButton, spdb_table, spdb_select, sp_construct_database_error, sp_notify, spdb_query, sp_construct_database_error, sp_notify, spdb_query, sp_construct_database_error, sp_notify, spdb_query, sp_construct_database_error, sp_notify, spdb_query, etc...

Any idea what this could be? There are literally thousands of lines with that same error message.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 27, 2013 - 8:41 am

before we address this perhaps you could try something for me as we could really do with a missing piece of evidence...

Could you go to the forum admin > toolbox > error log and scroll down to the bottom and empty the log. Then run the forum's front page (group view) once. Go back to the error log and see if there are any entries and if so - is there a specific database entry. If so could you paste that in a reply please.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Mar 27, 2013 - 9:55 am

I cleared the SP error log, went to the forum page and then checked both, SP error log and server error log. Both have no new entries (SP error log remains empty).

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 27, 2013 - 11:10 am

(I removed all of the dupes in your original post by the way).

It is a shame nothing showed up as I was hoping we might discover if there is a genuine SQL error. Although of course the answer to that is no - not that time!

What is happening is that the mySQL server 'went away' - became unresponsive - and that triggered a DB error which we then tried to write to the SP error log which itself needs a database entry to be made which failed and tried to write an entry to the SP error log etc.. etc...

SO it goes on and on until the server makes a re-appearance.

What we don't know is why the server became unresponsive and if the original error it was trying to write has any importance.

The first thing to say is that if I look through my php error log now I will find some of these 'gone away' messages - some of them related to SP and some not. Some within WP core sql calls and some in other plugins. You are not unique in that regard!

The next thing is that we did find we could minimise them by some carefully adjusted MySQL settings but (a) I did not do them and (b) I am afraid I have no idea what they were.

But most importantly - I rather thought that we had fixed the irrational looping with the error log write attempts quite a while back so I have to ask - which version of SP are you using?

 

andy-signature.png
YELLOW
SWORDFISH
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Mar 27, 2013 - 12:11 pm

Thanks so much for the detailed feedback, I am going to bookmark that for future reference.

Concerning SP version, I am using Version 5.2.6, Release 9877.

FYI, I just checked both error logs again, still no new entries. I'll keep watching though.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 27, 2013 - 3:09 pm

OK - looks like I need to look at that code again to see what has shifted as I know we stopped that loop at one point.
Did you notice the dates on all of these groups of entries? If they were al around the same time then it could have been that the server was playing up for some reason at that point.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Mar 28, 2013 - 3:53 am

Yes, they were all within roughly 60 seconds, about twice a day. Just checked my server error logs and the error now reappeared, starting with:

[28-Mar-2013 01:15:33] WordPress database error MySQL server has gone away for query SELECT  * FROM wp_sfforums WHERE forum_rss_private=0 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/paperpunch_pro_MWA/no-sidebar.php'), the_content, apply_filters('the_content'), call_user_func_array, sp_render_forum, sp_process_template, sp_load_template, include('/sp-resources/forum-themes/byw/templates/spGroupView.php'), sp_load_template, include('/sp-resources/forum-themes/byw/templates/spFoot.php'), sp_AllRSSButton, spdb_table, spdb_select

That's the first entry after I rotated my logs. Lasted for about 45 seconds creating several hundred entries for the initially mentioned error, then went away. No new entries yet. I am investigating some other plugins for potential issues to see if anything uses up too many resources.

 

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 28, 2013 - 5:06 am

I have opened a ticket on the looping of the error log write so i can look into that.

It is perhaps curious and just a coincidence that both of the initial queries you have pasted here - i.e., the first reporting that the server has gone away - have both come from the RSS feed.... At least I assume a coincidence.

Have you checked your database tables recently? Might be worth running a check on them for errors and just optimising them generally.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625