reportviewer 严重消耗内存

最近,發現當ReportViewer繫結的資料太大時,會發生 Memory leak。也就是吃記憶體,而且不會吐回來。

SQL reporting services ReportViewer control increases w3wp process memory

################# 

There are actually two problems here.  Running a report requires the report processing engine to generate and load an assembly in order to evaluate expressions in the report.  By default in local mode, this expression host assembly is loaded into the main appdomain.  Since assemblies can't be individually unloaded, it remains loaded permanently.

Local mode does have the option to run expressions in a sandboxed appdomain (ReportViewer.LocalReport.ExecuteReportInSandboxAppDomain()).  However, there is currently a bug that this appdomain does not get unloaded at the appropriate time.  We are currently working on a fix for this and hope to get this into VS 2008 SP1.  If you need a fix sooner, customer support may be able to provide additional options: http://support.microsoft.com/contactussupport

################# 

I'm using ReportViewer control in asp.net project and detect memory leak. I have installed visual studio 2008 sp1 and ReportViewer sp1, however the new ReportViewer (Version 9.0.0) doesn't solve the problem.
Could anybody provide some suggestion for web ReportViewer?
Thank you very much.

 

################# 

 

I observed the same problem using, in a batch process, iteratively the method ReportViewer.Render.

This causes a very problematic leak, my intention was to use ReportViewer to produce a lot of PDF documents (invoices) (> 5000 or more) and this leak forces me to stop-restart this batch process.

In other answers you say that the fix for this problem will come in a Microsoft ReportViewer for VS 2008 SP.

Is it possible to have a fix for this for .NET 2.0 (that is, with Microsoft ReportViewer for VS 2005)?

In my production systems for now I have .NET 2.0 Runtime installed and for now I have no time and plan to pass to .NET 3.5 to run the fix.

For now I haven't a plan to use Microsoft ReportViewer for VS 2008 (from Microsoft site, the Redistribuitable package  requires to install the .NET 3.5 runtime) and .NET 3.5 runtime.

Then, is it possible to have a fix for this problem that runs on .NET 2.0 Runtime?

 

If Session.Count > 0 Then
For i As Integer = 0 To Session.Count - 1
If Session(i).GetType().ToString() =
"Microsoft.Reporting.WebForms.ReportHierarchy" Then
Session.RemoveAt(i)
End If
Next
End If

 

 

http://social.msdn.microsoft.com/forums/en-US/vsreportcontrols/thread/143bc47c-d93f-4783-a37d-471bcb04203f/

http://social.msdn.microsoft.com/forums/en-US/vsreportcontrols/thread/d21f8b56-3123-4aff-bf84-9cce727bc2ce

 

http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/0da81cef-cb62-463f-9f4b-bd92f60a545e

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=449474&SiteID=1
http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-1295
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=305199

posted @ 2010-01-22 19:03  emanlee  阅读(831)  评论(0编辑  收藏  举报