Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT Memory Management
jonesch
Hello,<br />
<br />
We integrating the BIRT Sample Viewer into our application. Everything is running smoothly, but after many reports are run (3-5 in most cases) consecutively the JVM memory usage keeps growing.<br />
<br />
It doesn't seem to be a memory leak. The memory will be returned after some down time of about 10 minutes. But in the meantime the reports will fail because of out of memory errors.<br />
<br />
Something interesting is if I profile the JVM, I see the memory jump. If I run gc, it has not effect. Then if I do a heap dump the memory <span class='bbc_underline'><strong class='bbc'>IS</strong></span> reclaimed.<br />
<br />
So my question is, is there any way of controlling this memory build up? Can we tell the Engine to release references to help in cleaning up memory?<br />
<br />
FYI: We render reports in two ways, using the viewer and straight through the BIRT report engine. We hold on to a single engine object threw out our application. Also I notice that the Sample Viewer holds on the a single instance of the report engine object.<br />
<br />
Any suggestions would appreciated.
Find more posts tagged with
Comments
JasonW
Are you setting the JVM Parameter:
XX:MaxPermSize=256m
Jason
jonesch
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="84049" data-time="1318447394" data-date="12 October 2011 - 12:23 PM"><p>
Are you setting the JVM Parameter:<br />
XX:MaxPermSize=256m<br />
<br />
Jason<br /></p></blockquote>
<br />
Yes.
JasonW
Are you closing all of your task?
Run the attached report to verify jvm parameters.
Jason
CBR
just a short note:
When running System.gc() there is no guarantee that unused memory is reclaimed just after the call. In most cases it just does nothing (
http://bugs.sun.com/view_bug.do?bug_id=6668279
)
Sun (Oracle :-)) even suggests to disable explicit garbage collection as it might cause massive performance problems and can even break your code.
jonesch
I am closing my tasks... and I assume that the Sample Viewer is doing the same.
I have attached the AppSessionInfo result.
I started playing around with a solution that seems to be working. I am creating a new ReportEngine instance for each report run. And calling destroy() when the report is complete. It seems to be cleaning up the memory more effectively.
Thanks for the quick replies.
JasonW
Starting a new ReportEngine is not an optimal solution as it is expensive time wise to startup and shutdown. Can you open a bugzilla entry for this?
Jason