-
Notifications
You must be signed in to change notification settings - Fork 715
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
Insufficient system resources exist to complete requested service #1166
Comments
@docjay, based on what you're saying, it sounds like you might have a session leak, meaning that enough sessions are being created that you're unable to create another. When you hit this error, can you try running |
Hit this error when debugging. There are two scenarios hitting the error When I want to get the source of session eventSession = new TraceEventSession("Test");
ETWTraceEventSource source = eventSession?.Source; and error occurs
And to enable the providers eventSession = new TraceEventSession("Test");
eventSession?.EnableProvider(new Guid("xxx"));
|
@anotheroyz, how many sessions exist when you run |
It's only 45.
Is it related to the debugging mode? Someone in 'Insufficient system resources' when I listen ETW events with EventFlow on ServiceFabric cluster mentioned that |
I ran into the same problem, having exactly 45 sessions as well. I didn't create any of these trace sessions myself, so it didn't appear to be caused by something I did. I temporarily worked around it by killing one of the ETW sessions on the box that seemed expendable. Not sure how safe this actually is... logman stop Microsoft-VisualStudio-Telemetry-PerfWatson2-37320 -ets |
It sounds like you're hitting the maximum number of ETW sessions. I know that VS creates one per VS instance, so if you have a few instances, this can contribute to this issue. But in general, I am seeing more and more sessions being created. I'll pass this along as feedback to the ETW team. |
Keep running into this as well. |
Same here... it just started this week for me. It happens when I call
|
Mine can get as low as 45, but when I start my debugging session it jumps right up to 52 again. ~MyEventListener()
{
_session.DisableProvider(_provider.GUID);
} Which I was hoping would help keep my ETW Trace Sessions clean, but alas it seems to make no difference. EDIT: I just went nuts and decided "What if I shut ALL of them down?" |
Restarting should generally solve the problem. If it doesn't, too many sessions are being started on boot, or the issue is something else. It's also worth calling out that |
I'm seeing this too. Is there a way to increase the number of ETW sessions as a workaround? Nothing mentioned here seems to help. |
Check out https://devblogs.microsoft.com/performance-diagnostics/wpr-fails-to-start-insufficient-system-resources/. The article talks about why this happens and what you can do to address it. |
That was useful article ! Thanks Brian. I was able to cleanup some sessions and removed some from startup. |
Excellent @VidyaKukke. We seem to have built up some critical mass around this problem and have it understood. Given that it is not a PerfView or TraceEvent issue, I'm going to go ahead and close this issue. For those that want more details, please see https://devblogs.microsoft.com/performance-diagnostics/wpr-fails-to-start-insufficient-system-resources/. |
When trying to register a provider in my own project using Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnableProvider from the Microsoft.Diagnostics.Tracing.TraceEvent nuget package, I get the following exception. The only way I've found to work around it is by restarting my computer. And after restart, I eventually hit the error again. (e.g. restart machine, wait a few days because I forget, then run the application and repro).
Is this known? If unknown, how can I help investigate this issue?
Running Windows OS build 19041.208
Nuget: Microsoft.Diagnostics.Tracing.TraceEvent v2.0.55
-2147023446
Insufficient system resources exist to complete the requested service. (Exception from HRESULT: 0x800705AA)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnsureStarted(EVENT_TRACE_PROPERTIES* properties)
at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnableProvider(Guid providerGuid, TraceEventLevel providerLevel, UInt64 matchAnyKeywords, TraceEventProviderOptions options)
The text was updated successfully, but these errors were encountered: