Lost Connection During Mysql query

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
KW
Posts: 124
Joined: Tue 19 Feb 2008 19:12

Lost Connection During Mysql query

Post by KW » Fri 11 Jul 2008 02:39

I am using IIS7 and mysql membership to authenticate. Many times when IIS7 goes to authenticate it will fail with this message:

Lost Connection During Mysql query

It basically times out trying to validate the user name and password from the database. Is there any known issues reguarding using mysql membership? This is a periodic problem. Here is the connection string:



I'm trying to use IIS7, WCF and datasets with your mysql component to setup an N-tier scenario with mysql as the backend. I'm not having very much luck.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 15 Jul 2008 11:43

Hello, KW.

We are testing our products with IIS 7.0.
Some problems were revealed, and are being investigated now. Please wait for the results.

Reagrds, Andrey.

KW
Posts: 124
Joined: Tue 19 Feb 2008 19:12

Post by KW » Wed 23 Jul 2008 00:31

AndreyR wrote:Hello, KW.

We are testing our products with IIS 7.0.
Some problems were revealed, and are being investigated now. Please wait for the results.

Reagrds, Andrey.
I have resolved my problem - or at least it has been working correctly for me for the last week now.

Basically, I am using the tableadapters.

Code: Select all

TabeAdapter.ATableadapter myadapter = new TabeAdapter.ATableadapter();

myadapter.Update( dataset);
I used to use the code above but I stopped. Now I explicitly create the connection and assign it to the TableAdapter. And after, I make sure it is closed. Doing this resolved my issue. I haven't had a problem since.

Code: Select all

TabeAdapter.ATableadapter myadapter = new TabeAdapter.ATableadapter();

MySqlConnection acon = new MySqlConnection();
acon = "SomeConnection";

myadapter.Connection = acon;

myadapter.Update( dataset);

if ( acon.Sate == Open ) {con.Close()}     


When I was debugging I seeing that the connection wasn't being closed properly. It could be something else. But this has fixed it for now for us.

Post Reply