permaculture playing cards*
The moose likes Java in General and the fly likes java.lang.OutOfMemoryError: PermGen space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java.lang.OutOfMemoryError: PermGen space" Watch "java.lang.OutOfMemoryError: PermGen space" New topic
Author

java.lang.OutOfMemoryError: PermGen space

Srinivas Kothuri
Greenhorn

Joined: Feb 08, 2010
Posts: 16
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

Joined: Jan 26, 2007
Posts: 160
Are you somehow holding the references of the temporary objects?
Srinivas Kothuri
Greenhorn

Joined: Feb 08, 2010
Posts: 16
Yes I do . . . but in different classes
Istvan Kovacs
Ranch Hand

Joined: May 06, 2010
Posts: 100
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

Joined: Sep 29, 2008
Posts: 12617

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.
 
 
subject: java.lang.OutOfMemoryError: PermGen space
 
Similar Threads
Scriptlet vs JSTL
memory arguments in start up script
Java Memory Leaks
Out Of Memory Error
startNodeManager.sh and startWeblogic.sh doesn't start to execute