Jump to content
Changes to the Jaspersoft community edition download ×

Heap space error during pdf report generation by Jasper 5.6 REST API


paban

Recommended Posts

I have been using jasper report server 5.6 community edition from last 6 months.

while creating jasper PDF reports by using REST API the following type of error comes repeatedly after 40MB of file creation.

i create those file in a loop by different parameters passing in the API. But regardless of number of pdf reports the "Heap space error" comes at around when the total sizes crosses 40MB.

I have used all the combination of Heap space sizes, perm gen sizes, and classes like -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled

Also i have used all the virtualizers(File, GZIP, Swap) with different parameters but no success.

My server is a 64bit WINDOWS 2008 server edition with 32GB RAM

The error comes like

"Exception in thread "bitronix-task-scheduler" java.lang.OutOfMemoryError: Java"

Kindly suggest.

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Heap memory problem is caused by not allocating enough memory to you JVM. Stop messing with other XX options and virtualizers and just increase the following values in your setenv.bat

-Xms8g -Xmx8g -Xss2M -XX:PermSize=32m -XX:MaxPermSize=512m

 

I've found JasperReports Server eats too much memory when generating and exporting reports. A report with input data in megabytes requires memory in gigabytes! When dealing with large reports, it may be better to write your own servlet to reduce the amount of memory required.

Link to comment
Share on other sites

thanks hozawa for the suggestion regarding own servlet.

I have already tried the values at setenv.bat with the values suggested by you and also some higher values with -Xms4096m -Xmx8192m -XX:PermSize=4096m -XX:MaxPermSize8192m but nothing worked out.

 

The same is happening at one linux Cent OS 6.5 too.

 

Link to comment
Share on other sites

  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...