Bug #19560 Lost connection error after few minutes
Submitted: 5 May 2006 12:56 Modified: 31 May 2006 19:44
Reporter: Yves Dieterich Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.21 OS:Windows (XP SP2 FR)
Assigned to: CPU Architecture:Any

[5 May 2006 12:56] Yves Dieterich
Description:
we develop windows applications connected to MySQL server (using SQLDirect)
The main connection all the time the exe is running
after a few minutes ( 15 mn) if we try to run a select query using
our main connection, we get an error message 
'Error 2013: Lost connection to MySQL server'

It look like some other pb already open, but I may have a way to identifiy it using Query Browser.

hope it helps.

How to repeat:
All tests are run on an XP SP2 EN computer

1- run the server (5.0.21 with default params)
2- run Query Browser (1.1.20)
3- run 'show processlist' query
 => you should get 2 lines

4- wait for 15 mn
5- run 'show processlist' again 
 => the query browser seem to be frozen for 30s-60s
 => then the query is run, and you get 3 lines. It seems that one connection is lost open

you can then repeat steps 4 and 5 and you'll get a newline each time
[5 May 2006 19:10] MySQL Verification Team
Thank you for the bug report. Please show us the value of wait_timeout
and interactive_timeout using the client which is showing that behavior. i.e:

c:\mysql\bin>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11 to server version: 5.0.21

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show variables like "%timeout%";
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| connect_timeout          | 5     |
| delayed_insert_timeout   | 300   |
| innodb_lock_wait_timeout | 50    |
| interactive_timeout      | 28800 |
| net_read_timeout         | 30    |
| net_write_timeout        | 60    |
| slave_net_timeout        | 3600  |
| table_lock_wait_timeout  | 50    |
| wait_timeout             | 28800 |
+--------------------------+-------+
9 rows in set (0.00 sec)

mysql>
[9 May 2006 8:23] Yves Dieterich
One more information  : the problem seems to appear only from version 5.0.19+. (I do not have it on 5.0.18)

Here are the informations asked
[C:\mysql50\bin]mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.21-community

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show variables like '%timeout%';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| connect_timeout          | 5     |
| delayed_insert_timeout   | 300   |
| innodb_lock_wait_timeout | 50    |
| interactive_timeout      | 28800 |
| net_read_timeout         | 30    |
| net_write_timeout        | 60    |
| slave_net_timeout        | 3600  |
| table_lock_wait_timeout  | 50    |
| wait_timeout             | 28800 |
+--------------------------+-------+
9 rows in set (0.00 sec)
[31 May 2006 9:56] Tonci Grgin
Hi Yves.
I was unable to repeat the behavior you described even after longer wait than 15min and with 2 or more connections to localhost.

mysql> select version();
+------------+
| version()  |
+------------+
| 5.0.22-log |
+------------+
1 row in set (0.00 sec)
Win XP Pro SP2
MySQL QueryBrowser 1.1.20

I also tried with MySQL server 5.0.23-debug residing on Suse linux and got correct response.

I have posted a question to SQLDirect developers regarding this but no answer came... If you have any more ideas, please set this report to open again.
[31 May 2006 19:44] Yves Dieterich
Hi, 

Thanks, I just download the 5.0.22 version and on the same machine , the problem is now gone (both with SqlQueryBrowser and my application). 
So there should have been a little change somewhere that solve this issue.
Thanks again for having a look at the problem.
[5 Dec 2006 21:15] Andris Kardos
5.1.9-beta has this problem again. 
When I reverted to the last 5.0.xx the problem gone.