The permanent generation is where the VM loads your classes. you need to
increase the size of that using -XX:MaxPermSize=128M.
The -Xms and -Xmx controls the minimum and maximum size of your heap.
Default the VM runs with is for PermSize is 64M
AFAIK with Tomcat you won't get around that issue, eventually after n number
of application re-deployments, n being relative to the MaxPermSize, Tomcat
will go belly up.
You can alleviate the problem by moving some of the common jars in your web
applications to ${tomcat.home}/common/lib where it will get loaded by the
tomcat classloader and not by the application class loader.
Between Tomcat and CGLIB ( which is used by Hibernate ) there is an issue
where the class references are not released and the PermGen fills up.
If there is a solution to this that anyone else knows about I'd LOVE to hear
about it, since it annoys the crap out of me.
Hope it helps.
Cheers,
Renier
_____
From: CTJUG-Forum@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Enrico Goosen
Sent: 30 January 2007 11:43
To: CTJUG-Forum@googlegroups.com
Subject: [CTJUG Forum] java.lang.OutOfMemoryError: PermGen space
Hi All,
Has anyone experienced this problem, and found a solution to it?
I'm experiencing this error in Eclipse 3.2, running Tomcat 5.5.20.
I've edited Eclipse.ini as follows:
-vmargs
-Xms512m
-Xmx1024m
I've also edited Tomcat's VM arguments to the same values, but having no
luck.
I'm not sure if this is an Eclipse problem or a Tomcat problem, but it
occurs when Tomcat tries to reload a web context.
Here's a stack trace:
2007/01/30 11:32:14 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
jdbc.con.close
jdbc.con.close
16 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/capri] -
Exception starting filter JDOFilter
javax.jdo.JDOFatalUserException: Exception thrown by
getPersistenceManagerFactory(Properties)
NestedThrowables:
java.lang.reflect.InvocationTargetException
at javax.jdo.JDOHelper.getPersistenceManagerFactory(Unknown Source)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(Unknown Source)
at
za.co.metcapri.common.util.JDOContext.initialize(JDOContext.java:88)
at za.co.metcapri.common.web.JDOFilter.init(JDOFilter.java:61)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
Config.java:223)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil
terConfig.java:304)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCon
fig.java:77)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:36
34)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3024)
at
org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:
432)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:
1277)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1569)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Cont
ainerBase.java:1558)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
... 17 more
Caused by: java.lang.OutOfMemoryError: PermGen space
NestedThrowablesStackTrace:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(Unknown Source)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(Unknown Source)
at
za.co.metcapri.common.util.JDOContext.initialize(JDOContext.java:88)
at za.co.metcapri.common.web.JDOFilter.init(JDOFilter.java:61)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
Config.java:223)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil
terConfig.java:304)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCon
fig.java:77)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:36
34)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3024)
at
org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:
432)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:
1277)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1569)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC
hildren(ContainerBase.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Cont
ainerBase.java:1558)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.OutOfMemoryError: PermGen space
2007/01/30 11:32:24 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
2007/01/30 11:32:24 org.apache.catalina.core.StandardContext start
SEVERE: Context [/capri] startup failed due to previous errors
Enrico Goosen
Software Developer
Metropolitan Employee Benefits
Email: [EMAIL PROTECTED]
Direct: 021 940 6231
Fax: 021 917 3089
Mobile: 083 305 5676
Metropolitan is an authorised Financial Services Provider.
NOTE: This e-mail (including attachments) is subject to the restrictions,
qualifications and disclaimers (the "disclaimer") published at
http://www.metropolitan.co.za Please read the disclaimer before opening any
attachments or taking any other action in terms of this e-mail.
If you cannot access the disclaimer, kindly send an e-mail to
[EMAIL PROTECTED] or contact [EMAIL PROTECTED]
and a copy will be sent to you.
By reading this e-mail or opening any attachment you agree to be bound by
the provisions of the disclaimer.
Web: http://www.metropolitan.co.za/
Disclaimer: http://www.metropolitan.co.za/email_disclaimer.html
Metropolitan Life subscribes to KPMG, a completely independent crime
disclosure service - make a contribution to the establishment of a fraud
free environment by reporting any suspicion to the KPMG Hotline
* RSA 0800 22 14 18
* NAMIBIA 0800 00 00 77
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CTJUG Forum" group.
To post to this group, send email to CTJUG-Forum@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---