Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To find out memory leaks in struts application

 
Abhi Singh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes I am getting OutOfMemory error when running my projects for multiple users.I am using jdk 1.6,netbeans 6.0. Can anyone suggest how to find out the memory leaks or to overcome this error. As I am using jdk 1.6, it takes the size of the heap automatically according to the operating System.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use a code profiler, but so far it sounds like it'd be easier to just look at the stack trace to see when the OOM occurs--without any further information it sounds like you're just doing something that's eating all the memory.
 
Abhi Singh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you David for your suggestion. I have used profiler to get those results but I am not getting the actual point where the leakage occurs. Still i will try. Anyways thanks for your suggestion
 
walter wang
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using PrintClassHistogram as VM parameter, and dumping several memory snapshots at different time to GC.log file,

By analyzing incensement of number and size of objects, you could find the root cause.

 
Joe Ess
Bartender
Posts: 9280
10
Linux Mac OS X Windows
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic