Getting Out of Memory errors with Alarm Journal Table

I’m getting “java.lang.OutOfMemoryError: Java heap space” with the Alarm Journal Table.

I have increased the max heap size to from 2MB to 4MB with no change.

Initial Java Heap Size (in MB)

wrapper.java.initmemory=1024

Maximum Java Heap Size (in MB)

wrapper.java.maxmemory=4096

I if I enter a date range that includes approximately 50,000 rows returned, it seems this is okay. Beyond that number the error starts to occur. What is strange to me though, is that after the error occurs, then sometimes even selecting a criteria which should return a smaller number of rows that has worked before will now have an error.

50,000+ rows is a lot, so perhaps a solution is a way to catch that the query is taking a long time, or returning too many rows and then add a nice user message to indicate that they should change the search criteria to return a smaller row set.

Is there either a way to solve for the memory issue, or catch a large query?

Thanks,
Bob

I don't think that you're going to be able to catch a large query because we really don't know how large it is until the resultset is returned. You could try increasing the max heap size more or you can just put some limitations in the project on how big of a time span that the users can query. I think limiting what the user is allowed to query is the best solution.

Yes, I figured since the query never returns that there wasn’t much we could do there. Increasing the heap size even to 8GB seems to have no effect even on a small change in date (rowset size) criteria.

I will add a practical limit to the user query criteria.