Not completely sure if this the right forum for this question. If not, please point me to the correct one.
My company is having an issue where a java app is encountering an OutOfMemory exception after about 8 hours of run time. After the intial load, it grows at a rate of about 100 megs per hour during core usage. During off hours, memory usage just plateaus. It should go down but does not...GC is pretty inneffective. The heap does not appear to be fragmented. This is a vendor application, so we are not able to look at the code. We've already engaged the vendor but are still running into some issues.
What we need to do is generate multiple heap dumps throughout the day before an OOM error is generated. I know that a kill -3 [pid] will do this, but that is only generating a javacore.txt file. I want the heapdump.phd file. How can this be generated on demand? I'm thinking that there is a command line option that I'm missing in my JAVA_OPTS.
IBM JDK 1.4.2
Tomcat 4.1.40 (don't think this makes a difference here)
I spent an entire month on one of those - partly because each test took about 3 days to reach critical mass. Finally discovered that Oracle's "cache" wasn't technically a cache in that it had no discard mechanism; it kept everything. Forever.
And it was documented that it was supposed to do that. Just not in a place that you'd see it until you already pretty well knew it. Changing the connection options made the problem magically vanish.
Sometimes the only way things ever got fixed is because people became uncomfortable.