Skip to content
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

Input string was not in a correct format 导致进程崩溃 #5

Closed
LGinC opened this issue Jul 6, 2021 · 1 comment
Closed

Input string was not in a correct format 导致进程崩溃 #5

LGinC opened this issue Jul 6, 2021 · 1 comment

Comments

@LGinC
Copy link
Contributor

LGinC commented Jul 6, 2021

nuget: <PackageReference Include="CZGL.ProcessMetrics" Version="1.0.0" />
runtime: aspnet:5.0-alpine

Error:
Unhandled exception. System.Diagnostics.Tracing.EventSourceException: An error occurred when writing to a listener.
---> System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Number.ParseDecimal(ReadOnlySpan1 value, NumberStyles styles, NumberFormatInfo info) at CZGL.ProcessMetrics.Counters.EventSourceCreatedListener.GetRelevantMetric(IDictionary2 eventPayload)
at CZGL.ProcessMetrics.Counters.EventSourceCreatedListener.OnEventWritten(EventWrittenEventArgs eventData)
at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, EventWrittenEventArgs eventCallbackArgs)
--- End of inner exception stack trace ---

出现得很频繁,基本启动10分钟就挂了

目测是这里报错了

建议添加全局异常处理, 不让程序崩掉

whuanle pushed a commit that referenced this issue Jul 6, 2021
@whuanle
Copy link
Owner

whuanle commented Jul 6, 2021

你好,已经修复了此问题,增加其它可靠性代码。

@whuanle whuanle closed this as completed Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants