Lost connection to MySQL server during query
Posted: Thu 26 Jun 2008 19:54
I've got 2 seperate VB.NET applications that are getting disconnected.
In both instances the connection will break at ~30 seconds reliably. App 2 was tested against 2 different versions of MySQL...and broke both times.
As seen above I tried numerous connection strings to get this to work. Unfortunately I cannot copy & paste actual code, and the apps themselves are fairly complex.
I've even attempted to Ping() the connection before App #2 reads each record but that didn't help. I also am attempting to Ping() the connection before Open() it.
Suggestions?
Code: Select all
App 1:
MyDirect.Net 4.3
MySQL 4.0.22 on server #1
Creates connection, executes SELECTs, DELETEs and INSERTS, closes connection.
Code: Select all
App 2:
MyDirect.Net 4.7
MySQL 4.0.22 AND MySQL 5.0 on server #2
Creates connection, pulls 1000 records into a data reader and loops through, closes connection.
Code: Select all
Connection String attempts:
SERVER=server;PORT=3306;DATABASE=Test;USER=root;PASSWORD=SECRET;Pooling=true;Max Pool Size=3;Connection Timeout=10;
SERVER=server;PORT=3306;DATABASE=Test;USER=root;PASSWORD=SECRET;
SERVER=server;PORT=3306;DATABASE=Test;USER=root;PASSWORD=SECRET;Pooling=false;Max Pool Size=3;Connection Timeout=10;
SERVER=server;PORT=3306;DATABASE=Test;USER=root;PASSWORD=SECRET;Pooling=true;Max Pool Size=3;Connection Timeout=100;
I've even attempted to Ping() the connection before App #2 reads each record but that didn't help. I also am attempting to Ping() the connection before Open() it.
Suggestions?