HttpListenerException during POST call

Hello,

I am using ServiceStack 5.4.0, Visual Studio 2017 on Windows 10 x64.
I am running two console applications on the same machine, both are running an AppHost inherited from AppSelfHostBase. They use ServiceStack client / server to communicate to each other.

In some cases, I receive the error as shown at the end of this post.
Unfortunately, I have not yet been able to reproduce the error. When I then start the application in Visual Studio to try to debug it, and make the same REST calls, the error does not occur again.
In this case, Application A makes a GET call and a few seconds later two different POST calls. The second POST call throws this error.

Did you ever see this error or have an idea, what I can do to isolate it?
It only happens once every few weeks on my local machine. On our production systems, I did not see this error until now.

Best regards
Daniel Petat

2019-02-15 14:36:40.7384 ERROR AppHost Error: HttpListenerException: System.Net.HttpListenerException (0x80004005): Der E/A-Vorgang wurde wegen eines Threadendes oder einer Anwendungsanforderung abgebrochen bei System.Net.HttpRequestStream.EndRead(IAsyncResult asyncResult) bei System.IO.Stream.<>c.<BeginEndReadAsync>b__43_1(Stream stream, IAsyncResult asyncResult) bei System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization) --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei System.IO.Stream.<CopyToAsyncInternal>d__27.MoveNext() --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei ServiceStack.StreamExtensions.<CopyToNewMemoryStreamAsync>d__40.MoveNext() --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei ServiceStack.Text.DefaultMemory.<DeserializeAsync>d__34.MoveNext() --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei ServiceStack.Host.RestHandler.<CreateRequestAsync>d__16.MoveNext() --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei ServiceStack.Host.RestHandler.<CreateRequestAsync>d__15.MoveNext() --- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde --- bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) bei ServiceStack.Host.RestHandler.<ProcessRequestAsync>d__14.MoveNext()

I can’t say I’ve seen this Exception, although you’ll have a better chance at being able to learn more about it on Google if the Exception was in English.

Ok, thank you.
Maybe some other user has seen it.

I hope to find a reproducable scenario.
It seems to be some kind of multi-threading problem to me, but I am not sure.