[Mono-list] The socket has been shut down

Andreas Trausinger andreas.trausinger at gmail.com
Fri Apr 18 03:47:59 EDT 2008


Hi there,

I have a problem using Mono for database operations.

The usecase is:

There a list object with approx. 12k items, make a database connection and
open up a Transaction. Then stepping through the list and write each item
using a stored procedure.

After the a hundred items processed, the following exception is thrown:

System.IO.IOException: Write failure --->
System.Net.Sockets.SocketException: The socket has been shut down
  at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32
size, SocketFlags flags) [0x00000]
  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32
offset, Int32 size) [0x00000] --- End of inner exception stack trace ---

  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32
offset, Int32 size) [0x00000]
  at Mono.Data.Tds.Protocol.TdsComm.SendPhysicalPacket (Boolean
isLastSegment) [0x00000]
  at Mono.Data.Tds.Protocol.TdsComm.SendPacket () [0x00000]
  at Mono.Data.Tds.Protocol.Tds70.ExecRPC (System.String rpcName,
Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean
wantResults) [0x00000]
  at Mono.Data.Tds.Protocol.Tds70.ExecProc (System.String commandText,
Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean
wantResults) [0x00000]
  at System.Data.SqlClient.SqlCommand.Execute (CommandBehavior behavior,
Boolean wantResults) [0x00000]
  at System.Data.SqlClient.SqlCommand.ExecuteNonQuery () [0x00000]
  at ExecuteNonQuery (System.Data.SqlClient.SqlConnection connection,
CommandType commandType, System.String commandText,
System.Data.SqlClient.SqlParameter[] commandParameters) [0x00000]
  at AddItem (Item item) [0x00000]
  at AddItem (System.Collections.Generic.List`1 item) [0x00000]

This is reproducible under Mono 1.2.4, 1.2.6 and 1.9.

Have already tried to remove the Transaction, but still the same result.

Appreciate your ideas!

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080418/c30a6c0a/attachment.html 


More information about the Mono-list mailing list