I'm using an ETL software Pentaho (only mildly relevant) -- it's built on Java. I'm getting heap space errors after 80 loops of a process every time --- I can increase the memory allocated to Java -xmx2048 or what have you, but that just "delays" the error and is a band-aid fix.
I have VisualVM and MemoryAnalyzer but am trying to figure out where to find the root causes/ objects/ threads that are causing extraneous objects to persist. I can see in VisualVM that the heap space memory gradually increases over time. I'm not sure what exactly I should be doing to find the cause though. Analyzing the heap dump upon error?