View Full Version : Out of memory

07-11-2003, 07:38 AM
Recently while I was trying a certain MDX query, it worked for some trials, but not others. I suspected something to do with the memory. I turned on verbose gc and it did seem that when the query failed, there were some repeated full gc and memory does not go down. I expanded the memory and the query then went through.
What was missing was indications of memory allocation failure. It seems the exception is silently absorbed and the query simply failed. I checked the tomcat log and I did not see any exception traces. Did I miss anything here or there is a better way to log the exceptions: since it would certainly be important to know when to tune memory settings
Thanks a lot

07-17-2003, 08:44 PM
Yeah, sorry about this, I can well imagine that there are situations where errors such as OutOfMemoryExceptions get swallowed and ignored during query processing.
Can you please log a bug on this issue? If you can provide a query on the FoodMart schema which reproduces the problem, that would make my life easier.
Mondrian's technique for processing huge queries is somewhat naive. It instantiates all members and cell calculations -- whether these are intermediate or part of the final result -- in memory, and will fail if there are more of these than can fit in memory. The easiest workarounds, I'm afraid, are to write queries which don't use huge numbers of intermediate results (e.g. sum up months, rather than days), and to increase the amount of memory available to Mondrian.