473,657 Members | 2,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11122
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.comw rote in message
news:9b******** *****@TK2MSFTNG HUB02.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
2797
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 decrypt method of this dll to show the credit card numbers on a Reporting Services report. I'm not even sure where this should be done. In the sql stored procedure or in the report itself? Any help would be greatly appreciated.
0
1016
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? Thanks, Trint
1
5071
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 seem to change the CSS for the thing at all . I've tried it's attribute key 'class' , I've tried its public field for Background colour, and a few other things and absolutely nothing changes its' appearance. It's quite bizarre. I'm using it as...
1
1274
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? Thanks, Trint .Net programmer trinity.smith@gmail.com
1
2897
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 seem to change the CSS for the thing at all . I've tried it's attribute key 'class' , I've tried its public field for Background colour, and a few other things and absolutely nothing changes its' appearance. It's quite bizarre. I'm using it as...
0
2402
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 within lists to make them work. I then go in and set the visibility conditionally on the various rectangles to hide them where there is no data in a group. The problem is that the reports work fine when they are on a report server in particular...
0
1203
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 display and print my reports. After printing a report, there seems to be some problem with character sets or locale settings for IE. I have a web page that displays financial data with dollar signs. After printing (or previewing) a report, the...
1
1908
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 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...
3
3411
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 report (.rdl) to the ReportViewer! I have the ReportViewer.LocalReport.ReportPath set to the path of the .rdl report but the report still dosen't display. Can somebody help me on this?
0
8403
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8737
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8509
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5636
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2735
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1730
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.