Bug #57449 Lost connection, Server gone away only with Workbench 5.2.29
Submitted: 14 Oct 2010 7:56 Modified: 25 Nov 2010 16:25
Reporter: Thomas Opheys Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:5.2.29 OS:Windows (xp prof)
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: regression

[14 Oct 2010 7:56] Thomas Opheys
Description:
Using MySQL Workbench 5.2.29 CE, I start getting error messages in many of my SQL scripts:

Error Code: 2013  Lost connection to MySQL server during query
Error Code: 2006  MySQL server has gone away

The server itself shows no message in its log.
Happens with different servers (version 5.1.48-community).

MOST IMPORTANT INFO:
Problem does NOT occur if MySQL Workbench 5.2.28 CE is used for the same SQL on the same client computer using the same server.

Error message appears after nearly exactly 30 sec query time and only on queries lasting longer than that.

Server seems to have executed the query because on second try, it returns the results immediately if out of the cache.

How to repeat:
On my system, using any query with execution time longer than 30 seconds.
[14 Oct 2010 10:04] Valeriy Kravchuk
Please, send error log and my.ini file content from your server.
[14 Oct 2010 10:46] Thomas Opheys
server my.ini

Attachment: my.ini (application/octet-stream, text), 901 bytes.

[14 Oct 2010 10:48] Thomas Opheys
server error log

Attachment: server.err (application/octet-stream, text), 657 bytes.

[14 Oct 2010 10:49] Thomas Opheys
I'm pretty sure that this is not a server problem but a Workbench 5.2.29 problem as all works pretty well with Workbench version 5.2.28
[14 Oct 2010 10:58] Valeriy Kravchuk
Please, check in Workbench preferences what value do you have for "DBMS connection keep-alive interval".
[14 Oct 2010 11:01] Thomas Opheys
600 seconds in both Workbench versions
[14 Oct 2010 12:31] MySQL Verification Team
Are you tested the same queries with the command line client mysql.exe?. Please check if you get same error messages.
[14 Oct 2010 13:23] Thomas Opheys
tested one of the queries causing the error:

SUCCESS:
- using mysql.exe client (47.01 sec query time)
- using MySQL ODBC 5.1 Driver (5.01.06.00)
- using MySQL Workbench 5.1.28

FAILURE:
- using MySQL Workbench 5.1.29, again after 30 sec (fresh installation)

It is not a server problem, it's exactly WB 5.1.29
[14 Oct 2010 15:16] Peter Kniaz
I have the same problem.  Started as soon as I loaded 5.2.29.  My OS is Vista.
[15 Oct 2010 16:14] Peter Kniaz
Any progress on this?  I've had to switch back to Query Browser until this is resolved (wasn't sure it was safe to try reinstalling WB 5.2.28 over 5.2.29).
fyi-- the server DOES continue to do the query.  I see the query running in the Connections tab in the WB Administration tool, even though WB SQL Editor says the server has gone away after 30 seconds of running.  I'm using mysql server 5.0.77 and HP Unix.  This problem wasn't happening on 5.2.28.
[17 Oct 2010 17:43] Dan Kloke
Same behavior occurs with ALTER TABLE interface.
[20 Oct 2010 15:23] Shauna McNulty
I have the same problem and I am running 5.2.29, with the latest server.  I also have no problems with the keep-alive time, or any sort queries.
[20 Oct 2010 16:01] Alfredo Kojima
Replace mysql_rdbms_info.xml from your installation from the one attached, then edit the connection and set some high Read Timeout value and retry.
[20 Oct 2010 16:01] Alfredo Kojima
mysql_rdbms_info.xml

Attachment: mysql_rdbms_info.xml (text/xml), 121.39 KiB.

[20 Oct 2010 17:25] Thomas Opheys
SUCCESS

file replaced, read timeout of connection set to 3600, slow query executed and no more connection loss after 30 seconds!

I will use this WB version tomorrow with surely some more cases and will give final feedback.

THANK YOU!
[20 Oct 2010 18:03] Peter Kniaz
Worked for me too!  I also set the Read Timeout to 3600.  THANKS!!!!
[21 Oct 2010 1:43] A A
Hi, I have the same problem ... I replace the file in the path (C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\data) and set the net_read_time parameter to 3600 (set global net_read_time = 3600) ... but ... I still have the problem ... please can you help me?
[21 Oct 2010 11:49] Peter Kniaz
I've been using it now since yesterday afternoon and it's working great.  Longest query so far has been 677 seconds -- no problems.  Glad to be back in WB.  Hadn't realized how quickly I had come to depend on some of its features vs. QB!

To A A:  I changed the read timeout as follows: In Workbench, go to the first (home) screen.  Highlight the connection in the left box, and click on "Manage Connections" below.  Then go to the advanced tab, highlight the correct connection, and change the read time out.  Maybe that will help.
[21 Oct 2010 14:37] Valeriy Kravchuk
Bug #57630 was marked as a duplicate of this one.
[25 Oct 2010 20:49] Alfredo Kojima
bug #57721 marked as a duplicate
[26 Oct 2010 8:27] Thomas Opheys
Final feedback from my side: with the changed timeout value, now this WB version is usable - and I think it's the most stable one since a few months! My compliments to the team, thank you!
[27 Oct 2010 2:46] Edwin DeSouza
Thomas, Peter - if you guys get a chance, the MySQL Workbench Team appreciates  Blogs or Tweets.  See  http://wb.mysql.com/?page_id=724
[29 Oct 2010 12:36] Alfredo Kojima
Marked bug #57837 as duplicate
[11 Nov 2010 16:20] Betsy Davis
I updated the mysql_rdbms_info.xml file but I'm still hitting the 30 second timeout.  I tried going to the Advanced tab on Manage Connections.  Looks like this may still be an issue w/ SSH.  

We have 2 db's:  one is "Standard (TCP/IP)" and one is "Standard TCP/IP over SSH".   On the Advanced tab for the Standard TCP/IP connection, I'm able to edit the Read Timeout (it's showing 3600 now).  On the SSH connection, there's no field to edit the Read Timeout.

I'm a networking dummy so any help would be greatly appreciated.  Thanks!
[16 Nov 2010 15:14] Eu D
I was having the same issue. I grabbed the xml from this thread and changed Read Timeout to 3600 (in Stored Connections, Advanced tab) but that didnt help me - queries were still timing out after 30 secs. I then did "set net_read_timeout = 3600;" and that fixed the issue for all subsequent long running queries. Use the following to see what your timeouts are: show variables like "%timeout";
[23 Nov 2010 4:20] Steve Fatula
Problem (and solution) still exists on MySQL Workbench 5.2.30 (Mac), just an FYI
[24 Nov 2010 15:33] Johannes Taxacher
fix confirmed in repository
[25 Nov 2010 16:25] Tony Bedford
An entry has been added to the 5.2.31 changelog:

In the SQL Editor, if a query ran longer than 30 seconds the following errors were generated:

Error Code: 2013  Lost connection to MySQL server during query
Error Code: 2006  MySQL server has gone away
[29 Jul 2011 8:56] Vijay Datar
Thank you very much it worked for me --Hema(Affinity)