Lost connection error although CommandTimeout, ConnectionTimeout and MySQLServer timeouts are increased

Lost connection error although CommandTimeout, ConnectionTimeout and MySQLServer timeouts are increased

Postby vincentfitzg » Tue 06 Feb 2007 14:23

Hello,

I got a problem where I get the well known "Lost connection" error while deleting entries from a big table.
The table looks like:

DROP TABLE IF EXISTS `aoi_delete_db`.`inspectionresults`;
CREATE TABLE `aoi_delete_db`.`inspectionresults` (
`ResultIndex` bigint(20) unsigned NOT NULL auto_increment,
`Time` datetime NOT NULL default '0000-00-00 00:00:00',
`ProductIndex` int(10) unsigned NOT NULL default '0',
`LayerIndex` int(10) unsigned NOT NULL default '0',
`BatchIndex` int(10) unsigned NOT NULL default '0',
`SectionIndex` int(10) unsigned NOT NULL default '0',
`Review` varchar(40) NOT NULL default '',
`Image` mediumblob,
`CameraIndex` int(10) unsigned default NULL,
`InspectionIndex` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`ResultIndex`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295 AVG_ROW_LENGTH=109596;

contains about 8000 rows and is about 900 Mb big.
The DELETE statement I try to execute is an ordinary "DELETE FROM ... WHERE BatchIndex=..." statement and should delete about 7600 rows.
I have already set all timeouts I could find ( Connection, Command and MySQLServer timeouts) to one hour (3600 seconds) and have set the max packet size to 128 Mb. I also tried setting the Direct-property of the connection to false, but that only gave me a "Not-Supported" exception.
Nothing of what I did helped, I always get the "Lost connection" error.
What else can I do?

Thanks a lot,
Vince
vincentfitzg
 
Posts: 10
Joined: Wed 27 Jul 2005 11:36

forgot...

Postby vincentfitzg » Tue 06 Feb 2007 14:26

I forgot to mention that I also alread checked wether the connection is still alive and open (Ping, Connection.State etc.) before executing the statement....

Vince
vincentfitzg
 
Posts: 10
Joined: Wed 27 Jul 2005 11:36

even more forgotten....

Postby vincentfitzg » Tue 06 Feb 2007 14:30

I also forgot to metion that I work in C# with VS 8.0 and corelabs 3.55 .net 2.0 on a local DB with mySQL Server 5.0.19 and mySQLClient 5.0.11 and that the delete statement works fine when I copy the same statement into the MySQL Query Browser and execute it there.....

Vince
vincentfitzg
 
Posts: 10
Joined: Wed 27 Jul 2005 11:36

Postby Alexey » Wed 07 Feb 2007 14:57

Did you try to use non-direct mode (Direct=false in the ConnectionString property)?
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby vincentfitzg » Wed 07 Feb 2007 15:11

Yes I tried setting the Direct-property of the connection to false, but that gave a "Not-Supported" exception.
vincentfitzg
 
Posts: 10
Joined: Wed 27 Jul 2005 11:36

Postby Alexey » Wed 07 Feb 2007 16:14

Could you send me (alexeyi at crlab dot com) the call stack and your MySQL ini file.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Alexey » Thu 01 Mar 2007 10:47

The problem occurs if timeouts are set by default. But if increase them everything goes right. Also I couldn't reproduce "Not-Supported" exception. You can send me your project to make my test true. Also please specify your operating system and your hardware architecture.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL