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

java.lang.OutOfMemoryError: PermGen space

 
Srinivas Kothuri
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm developing an eclipse based solution which contains 10 plugins. While running , I frequently encountered the "java.lang.OutOfMemoryError: PermGen space" exception. I do have some eclipse based profiling tool by which I found some temporary objects are being created tens of thousands of times which are not cleaned up by GC properly. I undestood the problem of the above exception, but found no way of solving it.

Regarding this, I want to know, whether it is in the scope of eclipse f/w (or) do i need to restructure my design.

Someone Kindly direct me in the right way, where to start .

Thank you . .. .
 
Manish Singh
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you somehow holding the references of the temporary objects?
 
Srinivas Kothuri
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I do . . . but in different classes
 
Istvan Kovacs
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try

-XX:PermSize=32m
-XX:MaxPermSize=200m
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:+HeapDumpOnOutOfMemoryError


You can also try the Eclipse Memory Analyzer in conjunction with the memory dumps created when the VM runs out of memory.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srinivas Kothuri wrote: temporary objects are being created tens of thousands of times which are not cleaned up by GC properly.

I doubt it's an issue of the GC not doing its job. More likely there are still references to the objects somewhere in your application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic