-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout while executing StartEventPipeSession #4557
Comments
@AT-WH thanks for reporting this issue. I believe there are two possible explanations for the issue:
Do the target processes have the Also collecting a dump of the target process at the point where we are timing out might shed light on why the diagnostics ipc thread is not responding. This would tell us if something is preventing the diagnostics IPC server from processing messages: One possible workaround might be to try modifying the default connect timeout (currently 30 seconds) though I am not confident that the problem could be eliminated using this solution (just the frequency reduced): diagnostics/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcClient.cs Lines 15 to 16 in 5ae2a15
|
Hi @tommcdon I confirm that I don't use I wonder if this is possible for a .NET process to 'decide' to skip initialization of the Event Counters in a situation of a very heavy load? For now I switched to StartEventPipeSessionAsync and use a CancellationToken, which expires after 5 seconds. This won't solve the problem, but at least my system works in a normal way and the only drawback is that it fails to collect stats from the process. |
Regarding this part
Do you have a quick tutorial on how to do this? Typically I deal with 'a bit' higher level programming than this ;). |
Description
In my code I follow the instructions from the docs and create a session using this snippet:
In most of the cases this works, but sometimes it fails to connect to a process running on my machine (note: I verified that
processId
is always correct). The error message is:This seems to be a random issue, so I can't provide a code to reliably reproduce it. I noticed that it occurs while my CPU is heavily loaded. In my environment I try spawning ~20 .NET processes that bring CPU utilization to 90-99%.
Then sometimes I see that a call to
StartEventPipeSession
freezes and times out after a while.I've also tried calling the function once again after the timeout, but the result is the same.
It looks like as if the process I want to connect to failed to initialize the Event Counters for whatever reason. Is it possible?
Configuration
Regression?
I saw the issue from time to time in the past, but now it became more problematic, as my IT system grew and I want to keep an eye on more processes.
Other information
My processes are launched using an .exe file that has the same name for all of the processes (i.e. each process uses a separate copy of the same binaries). Previously I used Performance Counters to track the stats of my processes and I remember that using the same name messes up with Performance Counters. Is it possible that it's causing problems here as well?
The text was updated successfully, but these errors were encountered: