Jump to content

running out of memory Java heap error


gunnard.fredrickson

Recommended Posts

I am running Jaspersoft 5.1.  I have a report that is displaying some data from a query which hits a SQL Server database.  The user asked me to modify the report by adding a field.  They also asked for 3 parameters added to the where clause, two dates for a date range and another field, a string.  The report does not produce any graphs just a number of columns.  I have added the new column without a problem.  I was also able to add the other new field to the where clause without a problem,  But when I add the new date range and modify the query by making that part an or as there is another date range in it, ex. (datestarted between parametera and parameterb and parameterc is null and parameterd is null) or (datemodified between parameterc and parameterd and parametera is null and parameterb is null) the report won't run at all or maybe only once or twice before I get an out of memory error.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You could have an issue with your query which keeps on generating data. 
Did you test your query in a DBvisualuser?  
In your jasper report try to limit the report to 1 row and see what happens. 

Also you could have a memory issues. How much memory have you allocated java being used through tomcat? 
In the setenv.bat or setenv.sh you can set the min and max java memory for heap and Perm. 

Also up -Xss2m to  Xss20m. I always had ad hoc memory issue with this until I update to 20m 

Example: 

set JAVA_OPTS=%JAVA_OPTS% -Xms2048m -Xmx4096m -XX:PermSize=128m
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=512m -Xss20m -XX:+UseConcMarkSweepGC
set JAVA_OPTS=%JAVA_OPTS% -XX:+CMSClassUnloadingEnabled
Link to comment
Share on other sites

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...