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 WrkkSheet 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 looged this in detail @ https://epplus.codeplex.com/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.

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐