vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| We are using MySQL 5.0.27 on RedHat Enterprise Linux ES release 4, and the MySQL-python-1.2.1_p2 connector. We are getting intermittent mysterious errors as follows: OperationalError: (2013, 'Lost connection to MySQL server during query') when attempting to connect to the MySQL server (note: on the actual connection attempt, this is before even trying a query). There doesn't appear to be any particular pattern to when these errors occur. The client and server are on different machines, communicating via TCP, but I have not managed to find any networking problems. Does anyone have any suggestions as to what the problem might be, or how we might go about trying to solve it? |
| |||
| we ran into a similar condition using 5.0.27 in a PHP application.. in our case it had nothing to do with the version. check your server logs for evidence of a restart. What we had done was naively imported innodb extents from a v.4 datbase which seemed to work fine at first but in fact setup an edge condition whereby certain perfectly valid SQL was triggering a GPF on the server. I realize that's quite unlikely that you have performed a similar sloppy import but there is likely some edge condition on your server (wierd permissions in the data directory, corruoted tables, etc.) but I still recommend that you scrutinize your server logs for evidence of a spontaneous restart. If that turns up nothing, you might try a fresh install of mysql on a separate host to see if the problem persists. Worst case, there is an upgrade patch available which might magically raise you above the problem. On 5/9/07, Jon Ribbens <jon+mysql@unequivocal.co.uk> wrote: > We are using MySQL 5.0.27 on RedHat Enterprise Linux ES release 4, > and the MySQL-python-1.2.1_p2 connector. > > We are getting intermittent mysterious errors as follows: > > OperationalError: > (2013, 'Lost connection to MySQL server during query') > > when attempting to connect to the MySQL server (note: on the actual > connection attempt, this is before even trying a query). There doesn't > appear to be any particular pattern to when these errors occur. > > The client and server are on different machines, communicating via > TCP, but I have not managed to find any networking problems. > > Does anyone have any suggestions as to what the problem might be, or > how we might go about trying to solve it? > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=mdykman@gmail.com > > -- - michael dykman - mdykman@gmail.com - All models are wrong. Some models are useful. |
| |||
| On Wed, May 09, 2007 at 09:22:34AM -0400, Michael Dykman wrote: > I realize that's quite unlikely that you have performed a similar > sloppy import but there is likely some edge condition on your server > (wierd permissions in the data directory, corruoted tables, etc.) > but I still recommend that you scrutinize your server logs for > evidence of a spontaneous restart. If that turns up nothing, you > might try a fresh install of mysql on a separate host to see if the > problem persists. Thanks for your suggestions. The hostname.err log contains absolutely nothing however, just the usual 'mysqld started' and 'Version:' lines. Certainly there's nothing about any restart. > Worst case, there is an upgrade patch available which might > magically raise you above the problem. Indeed, I see there is 5.0.37 now. I'd rather not go through an upgrade though unless I knew it was likely to fix the problem. |
| |||
| When we first examined our server logs, we saw the same.. in our case (again) it was only when we slowed down and examined the timestamps on the start/stop messages that we realized that the server was restarting at unexpected intervals. Over the course of our development, we came across this issue a couple of times.. the problem was never found to be on the clint or have anything to do with nefarious sql being executed.. we found binary data issues, build issues (how did you get your binaries? pre-compiled from the archive or build your own? and for what OS?) and server config problems.. When you do find the cause let me know; I"m thinking of starting a collection :-) - michael On 5/9/07, Jon Ribbens <jon+mysql@unequivocal.co.uk> wrote: > On Wed, May 09, 2007 at 09:22:34AM -0400, Michael Dykman wrote: > > I realize that's quite unlikely that you have performed a similar > > sloppy import but there is likely some edge condition on your server > > (wierd permissions in the data directory, corruoted tables, etc.) > > but I still recommend that you scrutinize your server logs for > > evidence of a spontaneous restart. If that turns up nothing, you > > might try a fresh install of mysql on a separate host to see if the > > problem persists. > > Thanks for your suggestions. The hostname.err log contains absolutely > nothing however, just the usual 'mysqld started' and 'Version:' lines. > Certainly there's nothing about any restart. > > > Worst case, there is an upgrade patch available which might > > magically raise you above the problem. > > Indeed, I see there is 5.0.37 now. I'd rather not go through an > upgrade though unless I knew it was likely to fix the problem. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=mdykman@gmail.com > > -- - michael dykman - mdykman@gmail.com - All models are wrong. Some models are useful. |
| |||
| We also have random lost connections on simple queries, but we are running MySQL v5.024a on Windows XP. We've checked the logs and nothing abnormal has turned up and we're using only MyISAM tables with InnoDb disabled. The only thing that I could suggest is to look for other copies of libmysql.dll and make sure you don't have an older version on your path. 3rd party products like to install older copies of these files. As for me, I'll have to upgrade MySQL in the hopes of correcting the problem. It is a PIA to come in in the morning only to find the overnight job has hung because a simple query has lost the connection. Mike |
| |||
| On Wed, May 09, 2007 at 11:17:59AM -0400, Michael Dykman wrote: > When we first examined our server logs, we saw the same.. in our case > (again) it was only when we slowed down and examined the timestamps on > the start/stop messages that we realized that the server was > restarting at unexpected intervals. The last restart, according to both the content of the log, and the operating system timestamp on the log file itself, was 6 days ago. The 'lost connection' message has happened several times today, however. > (how did you get your binaries? pre-compiled from the archive > or build your own? and for what OS?) We used the official RPMs from www.mysql.com for our exact version of RedHat Linux (RedHat Enterprise Linux ES Release 4, 64-bit). > When you do find the cause let me know; I"m thinking of starting a > collection :-) I'll keep you informed ;-) |
| |||
| Jon Ribbens a écrit : > We are using MySQL 5.0.27 on RedHat Enterprise Linux ES release 4, > and the MySQL-python-1.2.1_p2 connector. > > We are getting intermittent mysterious errors as follows: > > OperationalError: > (2013, 'Lost connection to MySQL server during query') > > when attempting to connect to the MySQL server (note: on the actual > connection attempt, this is before even trying a query). There doesn't > appear to be any particular pattern to when these errors occur. > > The client and server are on different machines, communicating via > TCP, but I have not managed to find any networking problems. > > Does anyone have any suggestions as to what the problem might be, or > how we might go about trying to solve it? > We found a similar issue because we were using persistent connection in php and had a firewall between the mysql and the webserver. The problem is that our persistent connection were setup for lasting up to something like 8 hours but the firewall was keeping state of the connection only for up to 1 hour when no data was transferred. After the firewall had flushed the state of the connection and that the webserver were trying to communicate through it, he was reporting "Lost connection to mysql server during query" We adjust the setting of the persistent connection to 45 mins and the problem went away. This don't have anything to do with the version, but that was with 4.1 -- Mathieu Bruneau aka ROunofF === GPG keys available @ http://rounoff.darktech.org |
| |||
| On Wed, May 09, 2007 at 10:07:41PM -0400, Mathieu Bruneau wrote: > We found a similar issue because we were using persistent connection in > php and had a firewall between the mysql and the webserver. The problem > is that our persistent connection were setup for lasting up to something > like 8 hours but the firewall was keeping state of the connection only > for up to 1 hour when no data was transferred. After the firewall had > flushed the state of the connection and that the webserver were trying > to communicate through it, he was reporting "Lost connection to mysql > server during query" It's a good suggestion, but I'm pretty sure there's no firewall acting between the client and the server, and that the connection is not being persisted (i.e. all connection attempts are genuine new connections). I've just upgraded all the clients and servers to 5.0.41 (which looks like it just came out); I'll see what happens. |
| |||
| On Thu, May 10, 2007 at 03:37:26AM +0100, Jon Ribbens wrote: > I've just upgraded all the clients and servers to 5.0.41 (which looks > like it just came out); I'll see what happens. It hasn't solved the problem, but it has changed the error message to: OperationalError: (2013, "Lost connection to MySQL server at 'reading authorization packet', system error: 0") (still nothing in the logfile). Does this ring any bells for anyone? |
| ||||
| At 06:03 AM 5/10/2007, you wrote: >reading > authorization packet If you do a google search: http://www.google.ca/search?q=lost+m...&start=90&sa=N you'll find about a hundred web sites encountering the exact same error. Ironically these errors were caught by the google indexing engine when the site failed to display the HTML page, so it got the error message instead. If you click on the link today, the error of course is gone. But if you click on the cache link, you'll see the same error message as it occurred (frozen in time as it were). Maybe the problem is with the hardware, like your network card disconnecting from the MySQL server machine? Or TCP/IP? Mike |
| Thread Tools | |
| Display Modes | |
|
|