EPPlus具有超出内存异常的大型数据集问题

编程入门 行业动态 更新时间:2024-10-28 08:16:38
本文介绍了EPPlus具有超出内存异常的大型数据集问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 系统内存不足异常。我看到内存Stream被保存时才被刷新。我们有1.5 - 2GB数据集。

我正在使用EPPlus版本3.1.3.0

我们执行以下操作

我们循环

- >创建一个包 - > datareader中的每个表 - >将工作表添加到包 - >处理每个表。 - >保存包。

每个Datatable是一个300Mg大小,最多15个表,从系统。

这是一个问题,我已经详细记录了@ https: //epplus.codeplex/workitem/15085

我仍然希望能够使用EPPlus它非常好的API。但是,一旦我们将它添加到包中,是否有更好的方式来释放工作表。

感谢您的帮助。

解决方案

我有这个问题,但是我通过切换平台目标的选项,从 x86 至 x64 或任何CPU 。 (右键单击项目,然后选择属性,然后选择构建,然后在平台目标上选择x64)

问题是对于平台 x86 ,您只能使用大约1.8 GB的RAM。对于平台 x64 ,您没有此限制。

System Out of Memory Exception. I see the memory Stream is only flushed when saved. We have 1.5 - 2GB Datasets.

I am using EPPlus Version 3.1.3.0

We do the following in code.

We loop through

--> Create a Package --> each table in the datareader --> Add WorkSheet to the Package --> Dispose Each table. --> Save the Package.

Each Datatable is of a 300Mg Size up to 15 Tables out form the System.

This is causing a issue, I have logged this in detail @ epplus.codeplex/workitem/15085

I still want to be able to use EPPlus its very nice API. but is there a better way to free up a worksheet once we add it to the package.

Thank you for helping.

解决方案

I had this problem, but I fixed it by switching the option of "Platform target", from x86 to x64 or "Any CPU". ( right click on the project, then select "Properties", then the tab "Build", then on "Platform target" select "x64" )

The problem is that for platform x86 you can use only about 1.8 GB of RAM. For platform x64, you do not have this limitation.

更多推荐

EPPlus具有超出内存异常的大型数据集问题

本文发布于:2023-07-26 09:37:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1215538.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:异常   内存   数据   EPPlus

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!