XF 1.2 Help with MySQL errors

P: I get an error when attempting to load a page and it states "MySQL server has gone away".
S: This is an issue with your server and something your host will be the best to help you solve. If you attempt to reload the page/rerun the task you received the error on, it is a possibility that it will be successful. Here are some related links to this specific error:
http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
http://xenforo.com/community/threads/unknown-error.56990/#post-607130

http://xenforo.com/community/threads/troubleshooting-faq-frequent-problems-solutions.62138/
 
thx. In both cases the I was able to continue after the error, but my real concern is that this error is a symptom of a bigger problem with my xenforo installation. I say that because I recently had to move hosts because of 500 errors and once on my new host had to move from a share host to a VPS... all the while I've been chasing these DB errors that no one seems to know how to debug... any suggestions?
 
I'd like to believe that but this is the third server I've had problems with... first on a shared host at 1and1, then on shared host at InMotion and now on a VPS at InMotion. Plus, I've noticed that the responsiveness of Xenforo has been gradually degrading (e.g. delay when typing). Do you (or anyone else) know how I can begin to debug this and figure what's going on?

BTW I did contact my host and they said they saw no problems on their end.
 
The first error effectively indicates that the MySQL server is down/unreachable, especially if it happens infrequently. The second error is covered in the MySQL doc entry, but it could indicate a timeout or that the MySQL server became unreachable/went down. If the errors are related, it would lean more to the server going down/becoming unreachable.

Of course, the question would be why this happens. If anything, it might indicate a load spike. The responsiveness you mention isn't related to server response (it's going to be related to your computer/browser), but if the server is slow in general, these errors are really just a symptom of the general load issues on the server.

Alternatively, it's possible that MySQL is being restarted for some reason. (You can check this: https://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html) I would recommend looking at your MySQL logs as well.

The short of it is that XenForo can't directly trigger any of these errors. They relate to internal MySQL issues or configurations. (The "gone away" issue could theoretically be triggered if you have a low wait_timeout and a server that sends email very slowly, for example. You should increase wait_timeout then; the default is actually 28800 seconds.)
 
thx Mike. just got off the phone with my host. they looked at the SQL error logs and told me that a xf_session table is crashing. I googled this and read some posts, but didn't find directions for how to debug/fix.

Do you know of any setting I can change/tweak either within Xenforo, or my cpanel that would help me fix this? Or, do you have other suggestions for next steps? I've been battling this problem for a month and my members are getting peeved.
 
How did they identify that? An error about that would be logged by XF. You can generally just run this query:
Code:
TRUNCATE TABLE xf_session;
Though it's worth noting that if a table ever crashes, it's going to be caused by something like MySQL being stopped incorrectly (non gracefully). It's not something that an application can ever trigger. That does seem to fit with the errors in the first message.
 
I don't know... we were talking and I asked him if he could find anything in the error logs that might help and he came back and told me that this was the error message that he found.

I keep thinking that there is some problem with my XF install or one of my addons because this problem has been happening on all three of the servers I've used in the last month. Is there anyway (like an addon/utility) I could debug this and find out why my forum keeps crashing?
 
In general, there isn't much that can be done at that level. The issues need to be observed and the behavior needs to be analyzed from a MySQL service/server (root) level.
 
In general, there isn't much that can be done at that level. The issues need to be observed and the behavior needs to be analyzed from a MySQL service/server (root) level.
thx... I just don't know where to go. My host points me to XF and you're pointing me to my host. But I keep coming back to the fact that this is the 3rd server I've been on... I've had the same serious problem on all of them.
 
As Mike said, only observation of the actual server can determine what went wrong and why. The links I provided do explain some of the causes, but without your server being examined by someone with access to the logs, it is nearly impossible to tell you want is wrong. It does boil down to a server issue or misconfiguration.
 
here are some of the errors that are being generated:

21-Feb-2014 13:46:19 UTC] PHP Fatal error: Method XenForo_Phrase::__toString() must not throw an exception in /home/alexts5/public_html/addon-domains/skeptiko.com/forum/library/WdbPopularContent/Listener.php on line 0
[21-Feb-2014 13:46:19 UTC] PHP Fatal error: Method XenForo_Phrase::__toString() must not throw an exception in /home/alexts5/public_html/addon-domains/skeptiko.com/forum/library/WdbPopularContent/Listener.php on line 0
[21-Feb-2014 15:20:11 UTC] PHP Fatal error: Method XenForo_Template_Public::__toString() must not throw an exception in /home/alexts5/public_html/addon-domains/skeptiko.com/forum/library/Dark/PostRating/EventListener.php on line 0
[21-Feb-2014 08:33:44 America/Los_Angeles] PHP Warning: Unknown: Error occured while closing statement in Unknown on line 0
[21-Feb-2014 17:25:34 UTC] PHP Fatal error: Method XenForo_Phrase::__toString() must not throw an exception in /home/alexts5/public_html/addon-domains/skeptiko.com/forum/library/XenForo/ViewRenderer/Xml.php on line 0
[21-Feb-2014 17:46:51 UTC] PHP Fatal error: Method XenForo_Phrase::__toString() must not throw an exception in /home/alexts5/public_html/addon-domains/skeptiko.com/forum/library/XenForo/ViewRenderer/Xml.php on line 0
[21-Feb-2014 11:45:39 America/Los_Angeles] PHP Warning: Unknown: Error occured while closing statement in Unknown on line 0
[21-Feb-2014 11:45:39 America/Los_Angeles] PHP Warning: Unknown: Error occured while closing statement in Unknown on line 0
[21-Feb-2014 19:57:56 UTC] PHP Fatal error: Method XenForo_Template_Public::__toString() must not throw an exception in /home/alexts5/public_html/addon-domains/skeptiko.com/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code on line 0
[21-Feb-2014 20:45:04 UTC] PHP Fatal error: Method XenForo_Phrase::__toString() must not throw an exception in /home/alexts5/public_html/addon-domains/skeptiko.com/forum/library/WdbPopularContent/Listener.php on line 0
[21-Feb-2014 20:45:04 UTC] PHP Fatal error: Method XenForo_Template_Public::__toString() must not throw an exception in /home/alexts5/public_html/addon-domains/skeptiko.com/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code on line 0
 
now I'm really stuck. my host was unable to bring my site back up. something is seriously messed up with my forum... pls advise... any suggestions appreciated?

BTW is there anyway to access my xf admin with my SQL db messed up like this?
 
thx. how ideas re how I might go about debugging? One thought I had is that since the problem seems to manifest by generating too many entries in the xf_seession table I could disable these addons and then see if the # of new entries in this table slows down... but then again, I really don't know if there is a problem with too many entries in xf_sessions? any suggestions?
 
Top Bottom