SoapCore
SoapCore copied to clipboard
performance issue as well while reading the body for the soap request, i got the memory dump, and this is the img
some performance issue as well while reading the body for the soap request, i got the memory dump, and this is the img
Originally posted by @akshaybheda in https://github.com/DigDes/SoapCore/issues/1021#issuecomment-1964225916
Hmm... If the problem truly lies in ReadMessageAsync
you could try to asynchronously copy the content of stream to a memorystream up top and use that instead.
That will result in more memory usage but might be a worthwhile change anyway.
you mean like the PR i created?
you mean like the PR i created?
Yes. Can you test your service with the new code and see if that helped with your performance issues?
So, i tested the service locally by referencing through the project, but the real performance i can only test once i have that build on a web app and run load test against it from different regions.
What i noticed when i ran locally is the cpu percentage was lower compared to current version. I can only tell about if this worked is once i deploy it in production, but anyways this is better since it is async, and does not block threads
Also meaning to ask, is there any thing that logs request body only if its bad request or something?
Also meaning to ask, is there any thing that logs request body only if its bad request or something?
Nope. It's certainly possible to do that in a middleware or an ISoapMessageProcessor but there is nothing built in
Is there any config to get Content-Length header for net6 application? I always get the Transfer-Encoding but no content length header, in the soapcore lib, in WriteMessageAsync i am able to see that its setting contentLength header, but in my response i dont get that
In asp.net core it's left out by design for performance reasons but it is set in WriteMessageAsync, as you've noted. I have never checked for it myself, so I don't know if there is a bug in SoapCore or if you're running into another issue
A new nuget package is on its way now
@andersjonsson merge failed due to csproj version needs to be updated
https://github.com/DigDes/SoapCore/pull/1028
I’ll try to get this sorted later tonight
appreciate it
The new nuget package should be available now
I was able to do a deployment to prod and the results were good, only thing thats being a problem is bunch of Microsoft.AspNetCore.Connections.ConnectionResetException showing up.
I think thats the same issue as this https://github.com/dotnet/aspnetcore/issues/45086 . Anything we could do to suppress these? I believe these were 400 bad requests earlier
@andersjonsson Microsoft hasn't made any progress about the noise generated by ComExceptions, with that being said, in the middleware, we are logging the errors and that is adding noise to the actual issues if any, you think we should supress the comexceptions as 400 till msft makes any progress
These are only for few hours but with lot of traffic, this is generating noise for logs.
https://github.com/DigDes/SoapCore/pull/1035
I deployed it in prod and it works great. Thanks for all the help