Lost connection to MySQL server during query

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
sumit
Posts: 62
Joined: Wed 03 Jan 2007 22:23

Lost connection to MySQL server during query

Post by sumit » Wed 09 Jul 2008 21:21

Hi

We are using v3.55 of the MyDirect.Net drivers to connect to MySQL version 5.0.22 pro. When running an ALTER query on a large table, we run in to "Lost connection to MySQL server during query" error.

The error occurs exactly 2 mins after executing the command against the database. If I use another MySQL client like SQLYog, the query executes fine but does take about 8 mins to complete.

The connection string looks like this:
User Id=userId;Password=pwd;Port=3306;Host=hostName;Database=dbName

Is there a way to increase the 2 min timeout value somehow? The timeout values on the server side are abundant and are definitely way more than 2 minutes so this has to be a client issue. Is there a way to specify auto reconnect using Corelab drivers?

This issue is critical for us to fix asap. Please help.

sumit
Posts: 62
Joined: Wed 03 Jan 2007 22:23

Post by sumit » Thu 10 Jul 2008 01:26

Figured out the problem...

The command.commandTimeout was set to 2 minutes deep down somewhere and hence queries were getting timed out after 2 minutes. Only if the error message was more useful... :)

Post Reply