gpt4 book ai didi

c# - ServiceFabric 应用程序中的 TraceEventSession 使用引发资源不足错误

转载 作者:太空狗 更新时间:2023-10-30 01:01:18 24 4
gpt4 key购买 nike

我有一个在集群中运行的全状态服务结构应用程序。我有大约 20 个全状态应用程序在同一个集群中运行。我已将 TraceEventSession 用于关联目的。我的集群有 10 个节点。当我部署应用程序时,我能够看到 TPL session 在性能监视器中处于事件状态。当集群中部署的应用程序数量增加时,我开始收到指定的错误

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

这是我在 program.cs 中编写的用于启用 tpl session 的代码

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

session.EnableProvider(ServiceEventSource.Current.Name);

我不确定在同一个集群中会部署多少状态的全服务应用。我将如何摆脱这个错误?

最佳答案

Windows 限制可以同时运行 64 个 ETW session 。考虑使用在每个节点上运行的单个无状态应用来创建单个 session 。

关于c# - ServiceFabric 应用程序中的 TraceEventSession 使用引发资源不足错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39980899/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com