Bug #40293 Unable to write data to the transport connection : An existing connection..
Submitted: 24 Oct 2008 2:22 Modified: 9 Jan 2015 14:34
Reporter: Jared S (Silver Quality Contributor) Email Updates:
Status: Won't fix Impact on me:
None 
Category:Connector / NET Severity:S4 (Feature request)
Version:5.3.0-SVN OS:Windows (XPSP3)
Assigned to: Assigned Account CPU Architecture:Any
Tags: An, by, closed, Connection, Connection, data, existing, forcibly, host, qc, remote, the, the, to, to, transport, unable, was, write

[24 Oct 2008 2:22] Jared S
Description:
Source
------
System

Message
------
Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.

Data
------
System.Collections.ListDictionaryInternal

StackTrace
------
   at
 System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)   at
 MySql.Data.MySqlClient.MySqlStream.SendPacket(MySqlPacket packet)   at
 MySql.Data.MySqlClient.NativeDriver.ExecutePacket(MySqlPacket packetToExecute)   at
 MySql.Data.MySqlClient.NativeDriver.SendQuery(MySqlPacket queryPacket)   at
 MySql.Data.MySqlClient.Statement.ExecuteNext()   at
 MySql.Data.MySqlClient.PreparableStatement.ExecuteNext()   at
 MySql.Data.MySqlClient.Statement.Execute()   at
 MySql.Data.MySqlClient.PreparableStatement.Execute()   at
 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)   at
 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()   at
 MyCouriers.queryc.cmd_reader_code()   at

How to repeat:
http://lists.mysql.com/dotnet/485

Suggested fix:
Adaptive repairing of TCP connection where possible.
[24 Oct 2008 2:24] Jared S
List | http://lists.mysql.com/dotnet/485
Forum | http://forums.mysql.com/read.php?38,8380,55209#msg-55209
Closed Bug | http://bugs.mysql.com/bug.php?id=6634
[24 Oct 2008 14:28] Tonci Grgin
Jared, if I read this correctly, it's a feature request, right? If so, please change the severity and I'll verify it as reasonable feature request.
[24 Oct 2008 20:06] Jared S
Severity >> S4
[8 Dec 2008 2:21] Jared S
External doc : "Desktop" Intel motherboards and Full Duplex. 
http://www.intel.com/support/network/adapter/pro100/pro100b/sb/cs-015976.htm
[8 Dec 2008 12:46] Tonci Grgin
Jared, thanks for reasonable feature request.
[14 Jan 2009 0:01] Jared S
I know that this is a major problem in the forums, heres some MSDN documentation..

http://msdn.microsoft.com/en-us/library/system.io.stream.canwrite.aspx
[2 Sep 2009 19:50] Matthew Bilek
Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
    at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
    at MySql.Data.MySqlClient.MySqlStream.SendPacket(MySqlPacket packet)
    at MySql.Data.MySqlClient.NativeDriver.ExecutePacket(MySqlPacket packetToExecute)
    at MySql.Data.MySqlClient.NativeDriver.SetDatabase(String dbName)
    at MySql.Data.MySqlClient.MySqlConnection.ChangeDatabase(String databaseName)
    at MySql.Data.MySqlClient.MySqlConnection.Open()

Using the .NET Connector 6.0.4
[2 Sep 2009 19:52] Matthew Bilek
Connecting to MySQL Cluster (mysql-5.1.34 ndb-7.0.6)
[2 Sep 2009 21:40] Jared S
Problem for me was Intel NIC on cheap Intel board not working in "FULL DUPLEX" mode.  So I eventually disabled them in BIOS and installed 3 new PCI NICs for whole business.