• 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

Perm Gen

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The perm gen error, went resolved ?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please explain what your question is about? Does it have anything to do with Tomcat?

How to ask questions on JavaRanch
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the question is related to the memory leak that happens when a .war is repeatably deployed in a running Tomcat instance. Eventually, you get a out of memory error; generally, "OutofMemoryException: PermGen space" but I get a slightly different behavior on my Mac versus my Linux box.

I read on another forum that this was not specifically a Tomcat problem but a problem with the "cglib".

In any case, even if it's not a Tomcat 5.5 issue I also wonder if Tomcat 6 has managed to work around the problem?
 
Author
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rafael,

PermGen space errors sometimes occur if you run multiple Web applications in single Tomcat instance, or if your application loads up a lot of classes. The JVM allocates a 64MB memory chunk for the permanent generation heap, which is the heap that holds objects such as classes and methods. When this space gets exceeded, you start getting the PermGen space errors. You would need to increase this setting: Use the -XX:MaxPermSize option in Sun�s JDK to increase the permanent generation heap space. The place to set this would be to edit your catalina.sh/.bat file and add it to the JAVA_OPTS environment variable.

PermGen errors can also occur if a web application is repeatedly 'hot deployed' in an running Tomcat instance. There as a Tomcat 5.5 bug on this (see http://issues.apache.org/bugzilla/show_bug.cgi?id=40679 ), which is supposedly fixed.

- Vivek

[ October 03, 2007: Message edited by: Vivek Chopra ]
[ October 03, 2007: Message edited by: Vivek Chopra ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We were getting a lot of these in TC6 so I added the following to catalina.bat (there are other ways to set this value, but I stick with what works for me ;) )

SET JAVA_OPTS=-XX:PermSize=64M -XX:MaxPermSize=128M
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic