Portal Home > Knowledgebase > Articles Database > MySQL server has gone away
MySQL server has gone away
Posted by mogsub, 09-04-2008, 08:02 AM |
Hi,
I have a dedicated server that I run a video hosting site. Sometimes when people upload files I get the error
MySQL Query Error: xxx
SQL error: MySQL server has gone away
SQL error code: 2006
Date: xxx
I have searched the internet and found that most people change the max_allowed_packet
I changed it also to something like 32MB but still sometimes I get this error.
Why does this happen? What else do you suggest me to change?
Thank you
|
Posted by superprogram, 09-04-2008, 12:33 PM |
go to phpmyadmin and click on status (or issue the command 'show status')
what all entries do you see in red?
|
Posted by mogsub, 09-04-2008, 01:45 PM |
I have the following in red:
Handler_read_rnd
Handler_read_rnd_next
Created_tmp_disk_tables
Opened_tables
thanks
|
Posted by Jonathan Kinney, 09-04-2008, 01:49 PM |
I was wondering what version of MySQL you were running. Other server specs and OS specs could help as well. I know I have seen that error with much older systems, but it has been a while.
|
Posted by Jonathan Kinney, 09-04-2008, 01:56 PM |
Also, from what I am guessing, your clients are using a PHP script to upload files, is that correct? If so, what version of PHP, and what PHP commands are you using to open a MySQL connection? There are all kinds of possible reasons for this error, just trying to get a bit more info just in case I can help.
|
Posted by koolcards, 09-04-2008, 03:51 PM |
I don't recall seeing that error before but found this link that describes it pretty well. (too much info to post the entire thing here):
http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
It sounds a lot like either the "wait_timeout" value (particularly when your clients are connecting from a WinDoze OS) or, as you mentioned, the "max_allowed_packet".
The text also describes some ways of troubleshooting the problem. Good luck.
|
Add to Favourites Print this Article
Also Read