[Mono-osx] Re motingException: TCP Transport error

silver83 silver83 at gmail.com
Tue May 12 09:35:25 EDT 2009


Hi all and thanks for the great work.
Remoting issue :

I have a server and a client, and the client sends frequent requests to the
server (2-5 times a second).
The requests a taken care of very quickly on the server (which just queues
up the request data and returns).

After about a minute of running - I get this on the client : 

System.Runtime.Remoting.RemotingException: Tcp transport error.

Server stack trace: 
  at System.Runtime.Remoting.Channels.Tcp.TcpMessageIO.ReceiveMessageStatus
(System.IO.Stream networkStream, System.Byte[] buffer) [0x00000] 
  at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage
(IMessage msg, ITransportHeaders requestHeaders, System.IO.Stream
requestStream, ITransportHeaders& responseHeaders, System.IO.Stream&
responseStream) [0x00000] 
  at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage
(IMessage msg) [0x00000] 

Exception rethrown at [0]: 
 ---> System.IO.IOException: Read failure --->
System.Net.Sockets.SocketException: Connection reset by peer
  at System.Net.Sockets.Socket.Receive (System.Byte[] buf, Int32 offset,
Int32 size, SocketFlags flags) [0x00000] 
  at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32
offset, Int32 size) [0x00000] 
  --- End of inner exception stack trace ---
  at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32
offset, Int32 size) [0x00000] 
  at System.IO.BufferedStream.Read (System.Byte[] array, Int32 offset, Int32
count) [0x00000] 
  at System.Runtime.Remoting.Channels.Tcp.TcpMessageIO.StreamRead
(System.IO.Stream networkStream, System.Byte[] buffer, Int32 count)
[0x00000] 
  at System.Runtime.Remoting.Channels.Tcp.TcpMessageIO.ReceiveMessageStatus
(System.IO.Stream networkStream, System.Byte[] buffer) [0x00000] 
  --- End of inner exception stack trace ---
  at System.Runtime.Remoting.Channels.Tcp.TcpMessageIO.ReceiveMessageStatus
(System.IO.Stream networkStream, System.Byte[] buffer) [0x00000] 
  at
System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage
(IMessage msg, ITransportHeaders requestHeaders, System.IO.Stream
requestStream, ITransportHeaders& responseHeaders, System.IO.Stream&
responseStream) [0x00000] 
  at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage
(IMessage msg) [0x00000] 

I checked this both on 2.0.1, 2.2_5, and 2.4_7.

1. Is there a way to get some more elaborate tracing out of the current mono
implementation as to what is happening behind the scenes ?   --trace causes
my app to fail miserably for unknown reasons.

2. Any idea concerning why this is happening ?  I read somewhere that
remoting requests are handled by threadpool threads, and when the pool is
used up, then requests can stall and even timeout, perhaps causing this kind
of error - but queuing up my handling of requests makes this very quick on
the server, and I'm seeing that the thread count remains reasonable.

3. From what I see in the imp of TCPChannel and the client and server
classes in mono, the "retryCount" configuration argument is ignored. Is this
true? if so - why ?


Thanks, Johnny.

-- 
View this message in context: http://www.nabble.com/RemotingException%3A-TCP-Transport-error-tp23502702p23502702.html
Sent from the Mono - OSX mailing list archive at Nabble.com.



More information about the Mono-osx mailing list