• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse questions are more suited in the IDE forum
CarefullyChooseOneForum

Moving.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
bin directory of tomcat
 
Vinod Vinu
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
reply
    Bookmark Topic Watch Topic
  • New Topic