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

Rob Wilkens robwilkens at gmail.com
Fri Jun 29 19:33:34 UTC 2012

Hash: SHA256

Getting something that is consistently reproducible would be ideal.

I've got something else on front of my priority queue at the moment, and
may not get back to this right away.

- -Rob

On 06/29/2012 02:26 PM, Ali Shahbour wrote:
> 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
> BR
> Shabour
> 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?
>> -Rob
>> 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
>>> getting.
>>> Unfortunately using the above example the server is not crashing but
>>> still
>>> it raise the error (note that in my live app , some time it do the same
>>> but
>>> 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
>>> before
>>> 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
>>> will
>>> raise the above error .
>>> Tomorrow I will change the client to a silver light application to
>>> simulate
>>> 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:
>>> Exception-Connection-reset-by-peer-tp4650173p4650235.html
>>> 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
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list

Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the Mono-devel-list mailing list