TraceEventSession usage in ServiceFabric application raises insufficient resource error

风格不统一 提交于 2019-12-07 10:23:10

问题


I have a State-full service fabric application running in a cluster.. I have about 20 State-full applications running in the same cluster. i have used TraceEventSession for correlation purposes. My cluster is having 10 nodes. When i deploy an application i am able to see the TPL session running active in Performance Monitor. When the number of application deployed in the cluster increased i started receiving the error specified

Insufficient system resources exist to complete the requested service. (Exception from HRESULT: 0x800705AA)

System.Runtime.InteropServices.COMException (0x800705AA): 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.EnableProvider(Guid providerGuid, TraceEventLevel providerLevel, UInt64 matchAnyKeywords, TraceEventProviderOptions options) at TestApp.Service.Program.Main() in C:\Agent_work\12\s\TestApp\TestApp.Service\Program.cs:line 61

this is the code i wrote in program.cs to enable the tpl session

session = new TraceEventSession("TestApp_TplSession");  
session.EnableProvider(TplEtwProviderTraceEventParser.ProviderGuid, TraceEventLevel.Verbose,
                        (ulong)TplEtwProviderTraceEventParser.Keywords.TasksFlowActivityIds);

session.EnableProvider(ServiceEventSource.Current.Name);

I am not sure of how many state full service application will be deployed in the same cluster. How will i get rid of this error??


回答1:


Windows has a limit of 64 ETW sessions that can be running concurrently. Consider using a single stateless app running on every node to create a single session.



来源:https://stackoverflow.com/questions/39980899/traceeventsession-usage-in-servicefabric-application-raises-insufficient-resourc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!