PDA

View Full Version : MySQL server has gone away reading from vb3_style


Martin_S
06-23-2010, 05:55 AM
Hi,

after updating to vbulletin 4 I get the following error mail some times per week:

Invalid SQL:

SELECT *
FROM vb3_style
WHERE (styleid = 4 AND userselect = 1)
OR styleid = 4
ORDER BY styleid ASC
LIMIT 1;

MySQL-Fehler : MySQL server has gone away
Fehler-Nr. : 2006

I know that "MySQL server has gone away" indicates a timeout. But hey, the statement is one of the easiest ones. And I don't get the same error with other statements!
What's wrong with this statement or the table? The Table only contains two records: the default style and my own style (with styleid 4)...

Thanks for help!

Martin

Marco van Herwaarden
06-24-2010, 05:42 AM
Please see the manual on this error: Lost connection to MySQL server during query (http://www.vbulletin.com/docs/html/troubleshoot_mysql_goneaway)

Martin_S
06-24-2010, 06:09 AM
Thank you for your answer. I have read the manual before asking. But I can't find any help there for my problem. The mentioned reasons in the manual:

1. Is that the server timed out and closed the connection. By default, the server closes the connection after 8 hours or 28800 seconds if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld via your server's /etc/my.cnf as well.
The statement is in my case very short (no join, selection of one row of a table with two rows). All other statements of vbulletin (which are much more expensive) work without an error.

2. Another common reason to receive the MySQL server has gone away error is because you have issued a ``close'' on your MySQL connection and then tried to run a query on the closed connection. You can check that the MySQL hasn't died by executing mysqladmin version and examining the uptime.
All other statements work at the same time without an error.

3. You can also get these errors if you send a query to the server that is incorrect or too large.
In phpmyadmin the statement works without an error.

4. Or simply your host restarted MySQL. I'd contact your web host and ask him to look into this.
That's not possible if the error only occurs on this statement...

So - any ideas?

Martin

Marco van Herwaarden
06-24-2010, 06:23 AM
It could be that a previous statement is overloading the MySQL server anbd by that causing the subsequent statement to generate this error.

Try disabling all your plugins and see if that solves the issue.

snakes1100
06-24-2010, 11:00 PM
Hi,

after updating to vbulletin 4 I get the following error mail some times per week:

Invalid SQL:

SELECT *
FROM vb3_style
WHERE (styleid = 4 AND userselect = 1)
OR styleid = 4
ORDER BY styleid ASC
LIMIT 1;

MySQL-Fehler : MySQL server has gone away
Fehler-Nr. : 2006

I know that "MySQL server has gone away" indicates a timeout. But hey, the statement is one of the easiest ones. And I don't get the same error with other statements!
What's wrong with this statement or the table? The Table only contains two records: the default style and my own style (with styleid 4)...

Thanks for help!

Martin

The statement may be fine, but whats in that style?

Does it do the same thing requesting a different style id?