abdfahim Posted February 14, 2008 Share Posted February 14, 2008 I use mysql version : Server version: 5.0.45-community-nt This is the most strange problem I ever seen......... I have a mysql table called daily_cell. When I run the following SQL query on the server (using phpmyadmin or with any php page using mysql_query function), the server connection just gone away (mysql service stops with error "#2006 Mysql server gone away")) !! INSERT INTO `daily_cell` (`BSC`,`CELL`,`Normal`,`daytime`) VALUES('BSE07','DH033933','Normal','2008-01-30 00:00:00') Then I made a replica of the table (copy Structure only) and name it as daily_cell_a. Now I run the query again INSERT INTO `daily_cell_a` (`BSC`,`CELL`,`Normal`,`daytime`) VALUES('BSE07','DH033933','Normal','2008-01-30 00:00:00') and it works!!! Then again I run the first query on the first table just deleting `CELL` field, INSERT INTO `daily_cell` (`BSC`,`Normal`,`daytime`) VALUES('BSE07','Normal','2008-01-30 00:00:00') and it works again !! What may be the problem??? Link to comment https://forums.phpfreaks.com/topic/91022-strange-problem-can-any-one-has-any-idea/ Share on other sites More sharing options...
nethnet Posted February 14, 2008 Share Posted February 14, 2008 I've done some Googling on this, and the most common reasons for it are MySQL timeouts (by default this occurs after 8 hours) or accidently closing the connection beforehand. This doesn't sound like the case for you, so I found this on the MySQL.com site: You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld receives a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by setting the server's max_allowed_packet variable, which has a default value of 1MB. You may also need to increase the maximum packet size on the client end. More information on setting the packet size is given in Section B.1.2.10, “Packet too large”. An INSERT or REPLACE statement that inserts a great many rows can also cause these sorts of errors. Either one of these statements sends a single request to the server irrespective of the number of rows to be inserted; thus, you can often avoid the error by reducing the number of rows sent per INSERT or REPLACE. Theo Link to comment https://forums.phpfreaks.com/topic/91022-strange-problem-can-any-one-has-any-idea/#findComment-466564 Share on other sites More sharing options...
abdfahim Posted February 14, 2008 Author Share Posted February 14, 2008 thanx .. but reading this i tried single line query on phpmyadmin instead or excuting it through php INSERT INTO `daily_cell` (`BSC`,`CELL`,`Normal`,`daytime`) VALUES('BSE07','DH033933','Normal','2008-01-30 00:00:00') Now this must not be the case of great many rows! Link to comment https://forums.phpfreaks.com/topic/91022-strange-problem-can-any-one-has-any-idea/#findComment-466594 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.