简体   繁体   English

OutOfMemoryException 与另一个异常结合

[英]OutOfMemoryException combined with another exception

I am looking into a memory problem and found this is the log today:我正在调查 memory 问题,发现这是今天的日志:

System.AggregateException: One or more errors occurred. System.AggregateException:发生一个或多个错误。 ---> System.ArgumentException: Exception of type 'System.OutOfMemoryException' was thrown.Couldn't store <15.02.2017 00:00:00> in period Column. ---> System.ArgumentException:引发了“System.OutOfMemoryException”类型的异常。无法在期间列中存储 <15.02.2017 00:00:00>。 Expected type is String.预期类型是字符串。 ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. ---> System.OutOfMemoryException:引发了“System.OutOfMemoryException”类型的异常。

Previous logs have OutOfMemoryException without the inner exception of以前的日志有OutOfMemoryException没有内部异常

Couldn't store <15.02.2017 00:00:00> in period Column.无法在期间列中存储 <15.02.2017 00:00:00>。 Expected type is String.预期类型是字符串。

Is one leading to the other or is it just random that this exception is thrown at the same time as the OutOfMemoryException ?一个导致另一个,或者这个异常与OutOfMemoryException同时抛出只是随机的? I am not asking how to fix the errors, but why they are seemingly bundled together in this one log statement and not the others.我不是在问如何修复这些错误,而是为什么它们似乎捆绑在这个日志语句中而不是其他日志语句中。 Any explanations/references/ideas?任何解释/参考/想法?

By the way, this is a.Net Framework application running as a Windows Service on a Windows 2012 Server with 16 GB RAM running a big calculation, so there are plenty of things that can be improved.顺便说一句,这是一个 .Net Framework 应用程序,作为 Windows 2012 服务器上的 Windows 服务运行,运行大计算,因此有很多可以改进的地方。 My task is to improve the code so that is doesn't use so much memory in the first place, and I was hoping to understand the log statement above properly.我的任务是改进代码,这样一开始就不会使用太多 memory,我希望能正确理解上面的日志语句。

I think that during creation of ArgumentException object there was OutOfMemoryException , hence AggregateException我认为在创建ArgumentException object 期间有OutOfMemoryException ,因此AggregateException

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM