Skip to content

Log heartbeat duration for slow heartbeats - #15273

Merged
halter73 merged 2 commits into
dotnet:masterfrom
Kahbazi:kahbazi/heartbeat
Nov 5, 2019
Merged

Log heartbeat duration for slow heartbeats#15273
halter73 merged 2 commits into
dotnet:masterfrom
Kahbazi:kahbazi/heartbeat

Conversation

@Kahbazi

@Kahbazi Kahbazi commented Oct 22, 2019

Copy link
Copy Markdown
Member

Fixes #12760

Comment thread src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs Outdated
Comment thread src/Servers/Kestrel/Core/src/Internal/Infrastructure/Heartbeat.cs Outdated
@halter73
halter73 merged commit 911f92c into dotnet:master Nov 5, 2019
@halter73

halter73 commented Nov 5, 2019

Copy link
Copy Markdown
Member

Thanks!

@springy76

Copy link
Copy Markdown

In which netcore version will this finally show up? 3.1.6 still shows old text without duration.

@Tratcher

Copy link
Copy Markdown
Member

The change is only in 5.0 previews.

@Tratcher Tratcher added this to the 5.0.0 milestone Aug 11, 2020
@Kahbazi
Kahbazi deleted the kahbazi/heartbeat branch August 11, 2020 12:31
@nblumhardt

Copy link
Copy Markdown

Just a heads-up, this introduced a small bug, the parameters to the log event are out of order, so the messages are nonsensical.

LoggerMessage.Define<TimeSpan, TimeSpan, DateTimeOffset>(LogLevel.Warning, new EventId(22, nameof(HeartbeatSlow)), @"As of ""{now}"", the heartbeat has been running for ""{heartbeatDuration}"" which is longer than ""{interval}"". This could be caused by thread pool starvation.")

Should be DateTimeOffset (now), TimeSpan (heartbeatDuration), TimeSpan (interval).

@ghost

ghost commented Mar 30, 2021

Copy link
Copy Markdown

Hi @nblumhardt. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@BrennanConroy

Copy link
Copy Markdown
Member

Thanks, we've already fixed it up in 6.0 and are backporting the fix to 5.0 #31080

@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HeartbeatSlow warning missing context

9 participants