wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Caused by: java.lang.OutOfMemoryError: PermGen space  ......what kind of error is this? 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 » Engineering » IDEs, Version Control and other tools
Bookmark "Caused by: java.lang.OutOfMemoryError: PermGen space  ......what kind of error is this?" Watch "Caused by: java.lang.OutOfMemoryError: PermGen space  ......what kind of error is this?" New topic
Author

Caused by: java.lang.OutOfMemoryError: PermGen space ......what kind of error is this?

Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
hi,, sometimes i get the following error on cosole of eclipse and evry time i need to restart tomcat server :-

Caused by: java.lang.OutOfMemoryError: PermGen space

what is this error and how to resolve this ?

thanks in advance


Vinod Kumar Nair
"Any fool can write code that a computer can understan. Good programmers write code that humans can understand."
Baiju Scariah
Ranch Hand

Joined: Mar 17, 2005
Posts: 33
As the error says, your system (or memory allocated to jvm) is running out of memory.

You may allocate more memory using when you run java program "-Xms512m -Xmx1024m", if there are more memory in your system

Please note that, you may change minimum and maximum memory to 1024 and 2048, if there is more than 2 GB memory
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

Eclipse questions are more suited in the IDE forum
CarefullyChooseOneForum

Moving.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

Your are running out of permgen space, so setting -Xmx and -Xms will not help. You will need to set -XX:MaxPermSize=128M (or other suitable size)


JBoss In Action
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Peter Johnson wrote:Your are running out of permgen space, so setting -Xmx and -Xms will not help. You will need to set -XX:MaxPermSize=128M (or other suitable size)


True, set -XX:MaxPermSize=256M as a first statement in catalina.bat
Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
True, set -XX:MaxPermSize=256M as a first statement in catalina.bat



can please tell me where exactly this catalina.bat would be available ?

thank you
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

bin directory of tomcat
Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
True, set -XX:MaxPermSize=256M as a first statement in catalina.bat


Thanks buddy i have got catalina.bat.
now please tell me one more thing that how much size can be given ?

like for e.g. - iam running 3GB of RAM. So can i provide 1024MB of that ?
does allocating more amount of memory would results in something bad or good ?

thank you
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If you need 1G of PermGen space something is horribly, horribly wrong. The default (I think) is 64M; as suggested try 128M, or possibly 256M (that seems high to me, but you never know).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Caused by: java.lang.OutOfMemoryError: PermGen space ......what kind of error is this?
 
Similar Threads
Regarding JVM options with Heap size and PermGenSpace
What is PermGen space?
Scriptlet vs JSTL
Out Of Memory Error
OutOfMemoryError: PermGen space - pl help