• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get heap dump for Java EE application/environment  RSS feed

 
Girish Vasmatkar
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

I'm not sure if it is the right thread to ask the question as it has to do with memory management. So, here I go---

I'm using glassfish app. server as the EJB container and the application I/m working on has search functionality implemented using Lucene. The application indexes the database items and the database is quite large. So during the optimize process(Using IndexWriter.optimize() ) I'm getting this error:




As it is clear that due to large index file the error is coming (At least I think so).
So, I was wondering how I can get over this error.
So, thought of looking at the heap dump. My question is how can i get the heap dump exactly at the time when the heap space error occured?


Regards,
Girish
 
Girish Vasmatkar
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ohhh..., I just got to know about the Performance thread. So, please moderators move it to Performance forum.

Regards,
Girish
 
Ulas Ergin
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp

-XX:HeapDumpPath=./java_pid<pid>.hprof Path to directory or filename for heap dump. Manageable. (Introduced in 1.4.2 update 12, 5.0 update 7.)

-XX:-HeapDumpOnOutOfMemoryError Dump heap to file when java.lang.OutOfMemoryError is thrown. Manageable. (Introduced in 1.4.2 update 12, 5.0 update 7.)
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!