CodeIgniter Forums
MySQL server has gone away problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: MySQL server has gone away problem (/showthread.php?tid=37541)



MySQL server has gone away problem - El Forum - 01-13-2011

[eluser]basty_dread[/eluser]
A Database Error Occurred

Error Number: 2006

MySQL server has gone away

select * from thttpstatuscode order by OrderNo

I keep on having this error. I checked on the google and I increased my max_allowed_packet = 128M

I currently upgraded the MySql. Please help thankx


MySQL server has gone away problem - El Forum - 01-13-2011

[eluser]Cristian Gilè[/eluser]
Hi basty_dread,

there are several reasons for the MySQL server has gone away error but the most common is that the server timed out and closed the connection.
Are you working with big BLOB columns? We need to know more about the query. T

Please, provide the code of the model and the controller.

Cristian Gilè


MySQL server has gone away problem - El Forum - 01-13-2011

[eluser]basty_dread[/eluser]
what is a big BLOB column?


MySQL server has gone away problem - El Forum - 01-13-2011

[eluser]Cristian Gilè[/eluser]
[quote author="basty_dread" date="1294932091"]what is a big BLOB column?[/quote]
Google is your best friend.

Please, provide the code of the model and the controller.

Cristian Gilè


MySQL server has gone away problem - El Forum - 01-13-2011

[eluser]basty_dread[/eluser]
I dont use model, only the database model of CI, my controller only. but just a basic database query:
but mostly my database record is 2000+, and most are with content. Thanks.


MySQL server has gone away problem - El Forum - 01-13-2011

[eluser]Cristian Gilè[/eluser]
How many records do you retrieve?

Cristian Gilè


MySQL server has gone away problem - El Forum - 01-13-2011

[eluser]basty_dread[/eluser]
The issue is solved. I ask the hosting company to changed the wait_timeout value to 28800