Lost connection to MySQL server during query

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
cwest
Posts: 5
Joined: Fri 30 Nov 2007 16:51

Lost connection to MySQL server during query

Post by cwest » Fri 30 Nov 2007 16:53

I'm using MySqldirect version 4.25 with .net 2.0 and LLBLv. 2.5. The problem I'm having is that when I issue a query via LLBL to a remote database, I'm getting the error: "Lost connection to MySQL server during query". This error only occurs when connecting to a remote host. It occurs 100% of the time at exactly 15 seconds (which happens to be the wait_timeout value on the hosted server). I'm not having any issues with a local database. Is there a way to set a value to override the wait_timeout set on the server? I found this: http://dev.mysql.com/doc/refman/5.1/en/ ... nnect.html which leads me to belive there is a way, the question is can I configure MySqlDirect to use an interactive setting?

Additional info:
The query is against a single table with 5 records (so the timeout isn't due to a bad query). If I run the query using a different mysql client, it takes a good 20 or so seconds before the query runs, then it returns results. The query execution time is <200ms.

I can successfully execute the exact same query against the same hosted database using 2 other clients without error (so it's not a connectivity or network config problem).

cwest
Posts: 5
Joined: Fri 30 Nov 2007 16:51

Problem solved

Post by cwest » Sat 01 Dec 2007 22:42

In LLBL I updated the dbUtils class as follows:

Code: Select all

public static MySqlConnection CreateConnection(string connectionString)
{
            MySqlConnection msc = new MySqlConnection(connectionString);
            msc.ConnectionTimeout = 120;
            return msc;
            //return new MySqlConnection(connectionString);
}

Serious

Post by Serious » Mon 03 Dec 2007 14:06

Is the problem solved?

Serious

Post by Serious » Mon 10 Dec 2007 13:05

I have answered you by e-mail.

Post Reply