并行计算时.net Core 内存溢出错误解决方法
选中项目,右键,编辑项目文件:
<PropertyGroup>
<ServerGarbageCollection>false</ServerGarbageCollection>
<!--- ServerGarbageCollection : 服务器垃圾收集 :不会让内存无限增长 -->
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
<!--- ServerGarbageCollection : 并发垃圾收集 :不会让内存无限增长 -->
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
参数说明:
ServerGarbageCollection:false
内存不会无限制增长
ConcurrentGarbageCollection:true
高并发垃圾回收,我们写True就行了
尚无评论!