0

我正在尝试呈现一份报告,然后从中创建一个 pdf。但是在我的生产服务器上,当我尝试执行此代码时;我得到一个系统内存不足异常。

经过分析,我发现执行此代码时:工作进程几乎达到 2 GB,并且在峰值点抛出异常。

任何人都可以帮我解决这个问题。我已经优化了报表和数据库对象。我也不想为此分配多个工作进程。我想我可能需要增加工作进程的内存分配,但是如何!

4

1 回答 1

0

Allow me to make a few assumptions;

  1. You are using Crystal Reports to generate the report for you yes?
  2. You have configured your IIS application pools' memory limits to Zero(0)(Meaning they should consume as needed)
  3. You are using the latest updated Reporting Objects in your code.
  4. If, as in my case, you have been relating these reports to SAP objects or any other COM objects, make sure you dispose of them properly, ie.

System.Runtime.Interopservices.marshal.FinalReleaseComObject(Object o);

If you could maybe mention what object exactly are taking up such a large amount of memory? How large is this report?

于 2014-06-03T12:36:07.403 回答