Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OutOfMemory-Eception

 
Blikkies Marais
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Herb Schildt
Author
Ranch Hand
Posts: 253
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic