Java heap space error

I’m getting an intermittent error while editing and running a report, with details

An internal error occurred during: “Preview Report”. Java heap space

Seems to happen if I run the report duration for 60 instead of 30 days but error persists if I revert to 30 days. It seems to be cleared if I shut down SMART and restart.

I dont have a huge database so would be a bit surprised if this really is a memory thing as implied by the word “space” in the message!

The query is a patrol summary by day and time, with one data model column (obs count), and in the report I have a filter to remove the hundreds of null rows generated by a patrol summary query, and another filter to remove patrols with very short distance. The filter is on the “Table” inserted in the report rather than on the “Data Sets” object for the report. I assume this is the best place to put the filter? And there are three sort columns on the Table. That’s all there is in the report. I have about 60 patrols in the database.

Hi Jeremy,
That does sound like a memory issue, but it’s surprising to see that with such a small dataset. I suspect it’s the various filters and sorting that compound to cause the problem. I think you should be able to address this by increasing the default memory allocated to SMART as outlined below:

  1. Go to the folder where SMART is installed and find the SMART.ini file

  2. Open this file in notepad

  3. Change the -Xmx1024M to -Xmx4096M
    image.png

  4. Save the file and restart SMART

Let me know if that doesn’t address the problem and I can escalate further with the developers.

Regards,
Matt

Thanks Matt will try that (it’s currently set at 2048). I take it there’s no way to avoid having that filter if I want a sensible summary list of patrols with start dates.
Jeremy

Hi Jeremy,
I think I understand. Because there isn’t a better way to include the patrol time, you need to include the group by the Start Hour as well as the Day, and that leads to a lot of empty values in the table. I suspect it would be less intensive if you applied the filtering to the Data Set instead of the table itself, as I think it’s currently rendering the table using the source data, then applying the filters in the table, which requires rebuilding the whole table since there are so many blanks.

Try moving the filtering to the Data Set instead of the table, and I think that should run a lot better.

1 Like