Jasper memory leak


Our web site uses JasperReports library to run some basic reports.  We've notice that on some occasions when larger volumes of reports are run our tomcat6 server comes to a grinding halt and requires a restart.  After eliminating some other sections of our site as being the issue our next stop was Jasper.  I created a load test and profiled a run of 500 reports and immediately noticed that there seemed to be memory leak (see image of surviving generations).  Is this a know issue in Jasper?  If not; how could my implementation cause a leak?  What other information can I provide?

michaeljlee0's picture
Joined: Nov 7 2012 - 7:40am
Last seen: 9 years 10 months ago

3 Answers:

There's nothing much anyone could say given the provided information.

Ideally a heap dump would allow us to see what leaks.  But memory dumps are large and include sensitive information.  Alternatively, a self contained test case to reproduce the behaviour would clarify what happens.  Progressive heap histograms might also yield some clues.



lucianc's picture
Joined: Jul 17 2006 - 1:10am
Last seen: 1 day 16 hours ago

Hello, I've  seen the same behavoir and have been trying to resolve for some time now. Others have been reporting this also

All of my profiling  highlights the biggest dominators as the Extensions.ExtensionEnvironment class and it's references to SpringExtensionRegistry, through the use of Hard References in its implementation of apache's Reference Map.

This is easily reproducible. I have a couple of reports that are executed over and over. Using your favourite profiler, do a memory profile and you'll clearly see the problem.

This has been reported way back to version 4x

Hope someone can help out here, in an enterprise environment where systems must be resilient this will never fly.


torrana's picture
Joined: Apr 1 2011 - 10:20am
Last seen: 7 years 5 months ago

It might be useful to review JasperReports Server Performance. Post if you have.

djohnson53's picture
Joined: May 25 2012 - 11:10am
Last seen: 1 year 7 months ago