Quantcast
Channel: SCN : Popular Discussions - SAP Crystal Reports, version for Eclipse
Viewing all articles
Browse latest Browse all 893

JRC temp files and disposing IReportSource

$
0
0

We are seeing somewhat alarming sizes of temp files created by the JRC that are not cleaned up when the report processes are finished.  They also seem to hang around in heap space.

 

1.  When generating a report, db-.crtmp and fb-.crtmp files are left behind, and these tend to be exponentially greater than the size of the report once it's generated, some of them 50+ MB for a report that ends up being less than 1 MB.  The ReportClientDocument is closed when the generation is finished, the other temp files seem to get cleaned up, just not the .crtmp.

 

2.  These .crtmp files are also left behind when viewing the report or exporting to a format, same size as when the report was originally generated.  I know we have to dispose the IReportSource and close the ReportClientDocument to free up the memory.

 

I can see that the ReportClientDocument is closed successfully after a report generation.  What I can't be sure about is if it's closed when viewing or exporting.  When a user sends a requests to view or export a report from the web client, a service call is made that creates the ReportClientDocument, retrieves the IReportSource, closes the ReportClientDocument, and returns the IReportSource to the client.  I know the ReportClientDocument is still open at this point, but once the service call is finished, I can't see the ReportClientDocument object anymore.  The IReportSource is then used in the client, and when the user is finished, the IReportSource is disposed.  This does not free up the memory or .crtmp files.  Is there a disconnect between the IReportSource and ReportClientDocument resource counts since the ReportClientDocument is created server side and the IReportSource is disposed on the client?!? 

 

Things we've tried to resolve this:

1.  Made sure we are disposing reports properly inline with this blog post: http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417400%29ID0702803050DB01299907315834996376End?blog=/pub/wlg/11649

 

2.  Set the timeout in CRConfig.xml to 15 minutes.  This seem to kill the object in memory, as the viewer no longer works after 15 minutes, but the /var/tmp files still remain.

 

3.  Setup a job to clear out the /var/tmp files every hour.  This is when we noticed that the disk space is not really freed up, since these objects are still open, and it does not release the file descriptors

 

Any input is appreciated.

 

Thanks,

Cameron


Viewing all articles
Browse latest Browse all 893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>