Closed WeihanLi closed 3 years ago
We don't think there would be any gain from parallelizing this. Thanks for your interest though!
I think if we use parallel would improve the heart beat efficiency, may reduce the occurrence of HeartBeat too slow
warning(sometimes occur in our application). Could you please have a double check on this? Thanks @BrennanConroy
may reduce the occurrence of HeartBeat too slow warning(sometimes occur in our application)
That likely happens for other reasons (like blocking threads in the application).
Thanks for the tip @davidfowl
I got the HeartBeat too slow
warning again and I can not see any thread startvation, the data is from the thread pool etw event data collected by prometheus-net.DotNetRuntime
The metrics data:
The warning log:
There's a web API project running on asp.net core 3.1
Look at the thread pool counters. The thread count and thread pool queue count
Could we add the thread info in the log so that we could find more helpful information easily, just like StackExchange.Redis
does
Just a mind, not for sure, need double check from the team.
There's the
Walk
method source inConnectionManager
, you can get details from https://github.com/dotnet/aspnetcore/blob/v5.0.0/src/Servers/Kestrel/Core/src/Internal/Infrastructure/ConnectionManager.cs#L55Since the
_connectionReferences
is aConcurrentDictionary
, so could we use Parallel insteadforeach
loop sequentially?