Jump to content

Strange problem, can any one has any idea?


abdfahim

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.