You are invited to Log in or Register a free Frihost Account!

General error - mysql server has gone away.

Hey there.

Having troubles when posting on my own board, and receiving a:

SQL ERROR [ mysql4 ]

MySQL server has gone away [2006]


SELECT topic_type, forum_id FROM phpbb_topics WHERE topic_id = 0


FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: posting.php
LINE: 872
CALL: dbal_mysql->sql_query()

I know it's about somekind of timeout-issue between my board and the server, but how can this be fixed?
Melacos wrote:
MySQL server has gone away [2006]

I've restarted MySQL on VPS1, and confirmed that your site loads fine.

Post here if you're still facing problems.
Thank you, but actually the problem is submitting posts on the site. It loads fine in general (and did so before as well), but when posting, I receive the mentioned error message. Hmmm.. Confused
No one? Crying or Very sad
Does it always appear when you are posting, or only from time to time? Do you use a mysql database located on the same server?
Well it started happening like two weeks ago - and yes, everytime I'm posting.
Yea, I believe I uploaded a mysql database to my account when first creating it.

This is what they advised on the phpbb board when being asked about the same problem:

"Firstly, since this started all of a sudden and is a server error, it is reasonable to assume that it is a problem with the database. The error itself means that the query is timing out while being run. It can be "fixed" by increasing the timeout values for MySQL.

If you have made any changes to your phpBB installation (such as installing modifications), then that may be the problem. If not, I suggest you contact your host again and have them take a closer look."

Not sure what to do with it though...
I'll try to play a bit with all the time outs and see what it does. However, you have a small forum and it seems like posting (wasn't able to do it) and registering fails with that error. Both shouldn't take very long, so I doubt it's the time out.

Another question, did you modify anything to the default php installation? I mean install mods or change something yourself. (and I don't mean only lately)
You might have met the 'spam-filter' application, that asks you if you're human. I think that's the only major thing I've added to the forum. Besides the obvious layout stuff.
What is also weird is that it seems to indicate that the mysql version is 4 instead of 5. Maybe it's set to version 4 somewhere and should be changed to 5?

Also, another thing, in the posted query that went wrong, it seems to ask for a topic with id 0. It seems to me that it shouldn't be doing this, only with a real (>1) topic id. Not sure what you can do about this, though, other then checking if there nothing wrong with the indexes of your mysql tables.

I asked you about the mods, because it might be due to some file/mod problems and uploading a clean phpbb installation might help. (but only as one of the lasts resorts)
Yep, it all seems really strange. Now I even tried uploading the backups of both the mysql databases and the home directory. No change though; same error message.
Update: Problem was fixed with disabling a little (apparently time consuming) option on my board control panel. Thanks for the help anyways!
Melacos wrote:
Update: Problem was fixed with disabling a little (apparently time consuming) option on my board control panel. Thanks for the help anyways!

Would it be possible to know what option was causing this (for similar cases in the future)?
Actually it was switching the DNS Blackhole list check off. Though I'd definitely prefer not to...
Related topics
MySQL Server
Problem with MySQL Server Please Help!!
error: Can't connect to local mysql server through socket
Quick and simple: What do I put in as MySQL server in e107?
Connecting to MySQL server
Mysql Server?
What is the MySQL server for
MySQL Server settings problem
MySQL Server
remote MySQL server
MySQL Server 2 Down
MySQL connection error on Server 2?
MYSQL Database Error on Server 2
putting image to mysql. "MySQL Gone Away"
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

© 2005-2011 Frihost, forums powered by phpBB.