473,378 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

how to correctly release a Reporting Services report (out of memory problem)

All:

I am having a problem with Microsoft Reporting Services. I am running a
local report (RDLC) on ASP.Net. Running the report obviously can use a lot
of memory because it must consume ADO.Net. My problem is that the report
does not seem to be very good about releasing the memory.

It appears that the report holds on to memory until the ASP.net session is
torn down. So, if I run the report over and over, I will eventually get an
Out Of Memory Exception. If I end the session, and then run the report, I
can see that memory is being released.

I used a memory profiler to determine what was rooting the memory:

The ADO.Net datatable is held in memory by the local report. The local
report appears to ultimately be held in memory because something in
reporting services inserted it into the ASP.net cache. It appears that it
is being released on session end.

I have tried calling the dispose method on the report viewer, but that
actually seems to make things worse (If I call that method directly, then
the memory is not available for collection even after the session is torn
down -- not surprising, I guess given that ht he help for the report
viewer's dispose method indicates that it is intended to be called
internally by the framework -- I just took a shot in the dark).

What should I be doing to make sure that the report releases its memory
gracefully after it has rendered?
Jun 27 '07 #1
2 11060
Hi J.Marsch,

Regarding on the VS 2005 reportViewer localReport processing memory issue,
I have performed some research and did found existing bug entry in our
internal catelog. Actually this problem is due to some of the dynamically
generated assembly not able to be unloaded at runtime. And the problem has
been divided into two parts and one is fixed and another part is still not
controllable by design. Here is the detailed description of the issue:

============================
By Design:
The object that is taking up more and more memory is the expression host.
Each time a report is compiled, we create a new expression host assembly to
evaluate expressions in the report. When the security settings are such
that the expression host runs in the current app domain, this assembly can
never be unloaded. To prevent continuously growing memory, you have two
options. 1 - don't set the security for the current app domain. The default
is a separate app domain. 2 - Don't call Reset(). When you call reset, we
reset all of the local processing information. If you just set a new report
definition we will not recompile it, so it will use the old expression host
and not need to load a new assembly into the appdomain.

Fixed:
I added some better handling for Dispose(). We close memory streams earlier
now, but we weren't holding a reference to them so it wasn't causing a
problem in this case. Also, with workaround #2 above, we were still
recompiling the report. We don't do that anymore for reports loaded from
the file system or embedded resource.
============================

Also, for your scenario, if the problem is still quite pressure to your
application environment and need a rapid resolution, I suggest you contact
the CSS for further troubleshooting to verify the problem. They'll help you
perform some further thorough troubleshooting and leverage more resource on
working out a solution or workaround:

http://msdn.microsoft.com/subscripti...t/default.aspx

Thanks for your understanding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



Jun 28 '07 #2
Thank you for this, Steven, and I'm sorry for the lag in getting back to
you.

I will check into the calls to Reset(), adn if we still have problems, we
will be in touch with CSS.

Regards

Jeremy
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:9b*************@TK2MSFTNGHUB02.phx.gbl...
Hi J.Marsch,

Regarding on the VS 2005 reportViewer localReport processing memory issue,
I have performed some research and did found existing bug entry in our
internal catelog. Actually this problem is due to some of the dynamically
generated assembly not able to be unloaded at runtime. And the problem has
been divided into two parts and one is fixed and another part is still not
controllable by design. Here is the detailed description of the issue:

============================
By Design:
The object that is taking up more and more memory is the expression host.
Each time a report is compiled, we create a new expression host assembly
to
evaluate expressions in the report. When the security settings are such
that the expression host runs in the current app domain, this assembly can
never be unloaded. To prevent continuously growing memory, you have two
options. 1 - don't set the security for the current app domain. The
default
is a separate app domain. 2 - Don't call Reset(). When you call reset, we
reset all of the local processing information. If you just set a new
report
definition we will not recompile it, so it will use the old expression
host
and not need to load a new assembly into the appdomain.

Fixed:
I added some better handling for Dispose(). We close memory streams
earlier
now, but we weren't holding a reference to them so it wasn't causing a
problem in this case. Also, with workaround #2 above, we were still
recompiling the report. We don't do that anymore for reports loaded from
the file system or embedded resource.
============================

Also, for your scenario, if the problem is still quite pressure to your
application environment and need a rapid resolution, I suggest you contact
the CSS for further troubleshooting to verify the problem. They'll help
you
perform some further thorough troubleshooting and leverage more resource
on
working out a solution or workaround:

http://msdn.microsoft.com/subscripti...t/default.aspx

Thanks for your understanding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.



Jul 5 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Amy B | last post by:
Hi, A co-worker is creating a vb.net web application which uses the CryptKeeper.dll to encrypt credit card numbers into a sql database. It is my job to pull these encrypted numbers and use the...
0
by: trint | last post by:
Ok, I have my C# app in VS.Net 2003 (this is a Winform) ready to show the SQL Reporting Services report from the app. What is my next step for showing the report from a "Show Report" button?...
1
by: Matt Swift | last post by:
Hi, Am using the Report Viewer component in the Microsoft Reporting Services assembly. I've compiled it, and am integrating it fine with my apps - however 1 problem always remains. I can't...
1
by: Trint Smith | last post by:
Ok, I have my C# app in VS.Net 2003 (this is a Winform) ready to show the SQL Reporting Services report from the app. What is my next step for showing the report from a "Show Report" button?...
1
by: Matt Swift | last post by:
Hi, Am using the Report Viewer component in the Microsoft Reporting Services assembly. I've compiled it, and am integrating it fine with my apps - however 1 problem always remains. I can't...
0
by: Gary Anniss | last post by:
Hi I have several reports that I have imported from Access into SQL Reporting Services 2005. They are multi-level grouping reports and SQL Server Reporting Services generates rectangles and lists...
0
by: =?Utf-8?B?amRzdGVudG8=?= | last post by:
(I apologize if this is a repeat. I was told to post under the managed news group. I'm a little confused, but...) I'm running SRS 2000 with SP2 and I'm using IE 6.0 with SP2 (and IE 7.0) to...
1
by: J.Marsch | last post by:
All: I am having a problem with Microsoft Reporting Services. I am running a local report (RDLC) on ASP.Net. Running the report obviously can use a lot of memory because it must consume...
3
by: S_K | last post by:
Hi and thanks in advance for your help. I have a Reporting Services report that I need to display in an ASP.NET web page using the ReportViewer. However I can't link the Reporting Services...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.