• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic