[Mono-list] Mono.Data.Tds.Protocol.TdsInternalException: Server closed the connection

Christian Hobelsberger hobi1972 at gmail.com
Thu Apr 17 10:47:27 EDT 2008


Hello,

maybe someone can help with this problem.

I have a c# application which is copying a lot of data from one sql-server
to an other one - along with doing some re-structuring of data. So there are
a lot of sql-statements and stored procedures invoked, transactions are
used, too.
After a certain time i get the following exception:

Unhandled Exception: Mono.Data.Tds.Protocol.TdsInternalException: Server
closed the connection. ---> 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.Tds.ExecuteQuery (System.String sql, Int32
timeout, Boolean wantResults) [0x00000] --- End of inner exception stack
trace ---
  at Mono.Data.Tds.Protocol.Tds.ExecuteQuery (System.String sql, Int32
timeout, Boolean wantResults) [0x00000]
  at Mono.Data.Tds.Protocol.Tds70.Execute (System.String commandText,
Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean
wantResults) [0x00000]
  at Mono.Data.Tds.Protocol.Tds.Execute (System.String sql) [0x00000]
  at System.Data.SqlClient.SqlTransaction.Rollback (System.String
transactionName) [0x00000]
  at System.Data.SqlClient.SqlTransaction.Rollback () [0x00000]
It always happens at the same record - if i remove the record - it happens
with the next ... so it seems not to be related to the record itself, but
more or less to the number of already processed records.

At the sql-server i see a message "invalid buffer from client, error 17805,
severity 20, status 3".

The code itself runs well under windows with .net ... on linux (centos 4.5)
using mono 1.4, 1.5 and 1.9 it crashes. The machine should have enough
memory, etc. The code was compiled with visual studio 2005 - and then copied
over to a linux machine.

Does anyone have an idea what the reason can be - or how this can be solved?

thank you
CH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080417/3bebd505/attachment.html 


More information about the Mono-list mailing list