paban Posted November 9, 2014 Share Posted November 9, 2014 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:+CMSPermGenSweepingEnabledAlso 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 RAMThe error comes like"Exception in thread "bitronix-task-scheduler" java.lang.OutOfMemoryError: Java"Kindly suggest. Link to comment Share on other sites More sharing options...
hozawa Posted November 9, 2014 Share Posted November 9, 2014 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 More sharing options...
paban Posted November 10, 2014 Author Share Posted November 10, 2014 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 More sharing options...
sadakar Posted March 21, 2015 Share Posted March 21, 2015 Check this if you are using mysqlhttp://stackoverflow.com/questions/6865538/solving-a-communications-link-failure-with-jdbc-and-mysql Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now