You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Roland Schmitt <ro...@gmx.de> on 2011/10/25 15:59:18 UTC

Application Re-Deployment leads to OutOfMemoryException - Tomcat 7.22

Hello,

we have an problem by re-deploying our jsf application war in tomcat 7.
Each time we re-deploy our application with tomcat7-maven-plugin we get an permgen error.

Also undeploying and deploying with the Tomcat Web Application Manager doesn't work and leads into the same error.
To get undeploying working we had to change the configuration in tomcats context.xml to <Context antiJARLocking="true" antiResourceLocking="true"> otherwise the web-inf\lib directory is not removed.
I also used the find leaks function of  Tomcat Web Application Manager after undepolying, which shows that the webapplication is still in use,
after some time (30-60 seconds) executing find leaks again results in no leaks found and the application deployment works again.

Also increasing the pergmgen memory of java vm helps to enabel re-deployment some times more, but after to much re-deployments the out of memory exception is back.
The Tomcat java opts used: JAVA_OPTS="-Xms2048m -Xmx2048m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:PermSize=1024m -XX:MaxPermSize=1024m"

Why is redeployment not possible? Is this issue known and can i do anything about that?

Folowing exception occurs on second deployment:

25.10.2011 14:50:07 org.apache.tomcat.util.modeler.BaseModelMBean invoke
SCHWERWIEGEND: Exception invoking method check
java.lang.OutOfMemoryError: PermGen space
	at java.lang.Class.getName0(Native Method)
	at java.lang.Class.getName(Unknown Source)
	at java.lang.Throwable.toString(Throwable.java:342)
	at java.lang.Throwable.<init>(Throwable.java:242)
	at java.lang.Exception.<init>(Unknown Source)
	at java.lang.RuntimeException.<init>(Unknown Source)
	at org.apache.tomcat.util.threads.DedicatedThreadExecutor.execute(DedicatedThreadExecutor.java:62)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5220)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:529)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1384)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
	at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
	at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:673)
	at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:431)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:187)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

Tomcat Version: 7.0.22
Windows Version: 7 Professional 64bit SP1
	
WebApplication includes following libs:	
Commons Lang 3 (3.0.1)
Javalution (5.5.1)
log4j 1.2.14 (1.2.14)
slf4j-log4j (1.5.8)
jul-to-sfl4j (1.5.8)
OWB (1.1.1)
BVal (0.3-incubating)
MyFaces (2.1.3)
PrimeFaces 3.0.M4-SNAPSHOT)
MyFaces CODI (1.0.1)
MyFaces ExtVal (2.0.4)
Hibernate (3.6.7.Final)
Jdts (1.2.4)

Roland
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: WG: Application Re-Deployment leads to OutOfMemoryException - Tomcat 7.22

Posted by Roland Schmitt <ro...@gmx.de>.
Thanks found an leak with your document in log4j, updating to version 1.2.16 fixed the problem.


> Von: Mark Thomas <ma...@apache.org>
> An: Tomcat Users List <us...@tomcat.apache.org>
> Gesendet: 16:06 Dienstag, 25.Oktober 2011 
> Betreff: Re: Application Re-Deployment leads to OutOfMemoryException -
> Tomcat 7.22
> 
> On 25/10/2011 14:59, Roland Schmitt wrote:
> > Why is redeployment not possible?
> 
> Your web application has one or more memory leaks.
> 
> > Is this issue known and can i do anything about that?
> 
> Fix the memory leaks. [1] may help
> 
> Mark
> 
> [1]
> http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Application Re-Deployment leads to OutOfMemoryException - Tomcat 7.22

Posted by Mark Thomas <ma...@apache.org>.
On 25/10/2011 14:59, Roland Schmitt wrote:
> Why is redeployment not possible?

Your web application has one or more memory leaks.

> Is this issue known and can i do anything about that?

Fix the memory leaks. [1] may help

Mark

[1]
http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org