[Mono-dev] WCF Fail with System.Net.Sockets.SocketException: Connection reset by peer

Ali Shahbour shahbour at gmail.com
Fri Jun 29 18:26:07 UTC 2012

In my real application , I got a collection out of 300 000 record and I do
search on it and send the result or top 30 items. Also  I got a request
approximately every 5 second.

We can try this also


On 6/29/12 1:23 PM, "Rob Wilkens" <robwilkens at gmail.com> wrote:

>Hi Shahbour,
>I think this is a lucky timing issue..  That is: The Thread.Sleep makes
>the SocketException happen in between when we are receiving or
>sending...  In your stacktraces, it's always WHILE we are sending or
>receiving that the disconnect happens and the crash occurs.
>One way to reproduce this might be to spawn copies that send LOTS of
>data (could be a bunch of zeroes) and receives back a bunch of data
>(again could be a bunch of zeroes), and while we spawn those copies,
>wait just long enough for the connection to start, then kill the client
>process externally (equivalent of kill -9 proc)....  And then just have
>this whole spawn and kill thing in a loop until it fails.
>One way to send lots of zeroes or whatever, would be to send a string,
>but before we send that string, continually append to that string in a
>loop so it becomes very long..
>What do you think?
>On 06/28/2012 06:35 PM, shahbour wrote:
>> http://mono.1490590.n4.nabble.com/file/n4650235/TestWCFServer.zip
>> TestWCFServer.zip
>> Hello Rob
>> I am attaching a simple application to demonstrate the error we are
>> Unfortunately using the above example the server is not crashing but
>> it raise the error (note that in my live app , some time it do the same
>> crash more) 
>> If you run the server like below you will notice the error
>> mono --debug --trace=N:nothing TestWCFServer.exe
>> Press enter to exit
>> [0xb0a7d000:] EXCEPTION handling: System.Net.Sockets.SocketException:
>> Connection reset by peer
>> [0xb0a7d000:] EXCEPTION handling: System.IO.IOException: EndRead failure
>> To run the example just start the server , then start the client and
>> getting the result back from server close it (Ctrl+C)
>> I put a delay in the server to demonstrate the request over internet
>>and to
>> have time to close it. After you close it by small time the application
>> raise the above error .
>> Tomorrow I will change the client to a silver light application to
>> exactly my application because the server crash approximately every
>>time I
>> close the browser before getting the result in my live example.
>> BR
>> Shahbour
>> --
>> View this message in context:
>> Sent from the Mono - Dev mailing list archive at Nabble.com.
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>Mono-devel-list mailing list
>Mono-devel-list at lists.ximian.com

More information about the Mono-devel-list mailing list