The memory usage of the VM is growing and growing with each request. This is going on until a OutOfMemory-Eception occures. Is there any reason why it is not being garbage collected? Im using j2sdk1.4.1_02. I have tried Resin 2.1.6 and Tomcat 5.0.12.
You are allocating some resource (i.e. database connection) and not freeing it. That's all I can tell you without you posting some code for us to look at.
I agree with Joe, you probably aren't releasing resources. If you don't think this is the case, can you give us more info (or post code as Joe suggests)? Finally, as an experiment, you might try called System.gc() to request garbage collection just to see if it changes anything. Its effects might offer a clue.
For my latest books on Java, including my Java Programming Cookbook, see HerbSchildt.com
John Smith
Ranch Hand
Joined: Oct 08, 2001
Posts: 2937
posted
0
Finally, as an experiment, you might try called System.gc() to request garbage collection just to see if it changes anything. Its effects might offer a clue. Another option is to start JVM with a -verbosegc option and try to correlate your program activities with the garbage collector log. Better yet, run your program through a profiler (such as OptimizeIt) to identify the memory leak.