You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matthew Patton <pa...@dm.org> on 2005/02/07 18:36:15 UTC

MemoryError: PermGen space after several redeployments

Hi,
 	I am using Tomcat 5.5.4 on Linux.  I am new to Tomcat and have a 
simple web application which I have been developing and testing in Tomcat. 
When I deploy, I create the war file, and copy it to Tomcat's webapps 
directory, at which point Tomcat automatically detects the new war file 
and deploys the web app.
 	However, after a dozen or so redeployments, I get the following in 
the midst of the deployment:

MemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space

When I stop Tomcat and start it up again, it works fine until I have 
redeployed a dozen times, at which point I get the same error.  Why is 
this happening?  Am I not redeploying properly?  It seems like a memory 
lead in Tomcat's deployer.

 						Thanks,
 						Matthew Patton


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


Re: MemoryError: PermGen space after several redeployments

Posted by Remy Maucherat <re...@gmail.com>.
On Tue, 08 Feb 2005 11:26:50 +0100, Peter Rossbach <pr...@objektpark.de> wrote:
> Hello Matt,
> 
> I hope we have fix that with 5.5.8 see:
> 
>  >http://issues.apache.org/bugzilla/show_bug.cgi?id=26135

You can use a context listener to clean that up.

The container can't always cleanup after the application, so if you
want to really use redeployment, then you need to make sure that
applications are reasonably well designed. Easy example of a leak that
can't be fixed by the container: put a JAR in common with a static
class keeping references to some of the application objects (ex: some
sort of server global cache), and don't clean these up.

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx

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


Re: MemoryError: PermGen space after several redeployments

Posted by Peter Rossbach <pr...@objektpark.de>.
Hello Matt,

I hope we have fix that with 5.5.8 see:

 >http://issues.apache.org/bugzilla/show_bug.cgi?id=26135
 >
 >Workaround for memory leak when reloading Struts based web 
applications by clearing the bean instrospector cache of the JVM on 
classloader stop, submitted by Tobias Löfstrand (remm)

regards
Peter

Matthew Patton schrieb:

> Hi,
>     I am using Tomcat 5.5.4 on Linux.  I am new to Tomcat and have a 
> simple web application which I have been developing and testing in 
> Tomcat. When I deploy, I create the war file, and copy it to Tomcat's 
> webapps directory, at which point Tomcat automatically detects the new 
> war file and deploys the web app.
>     However, after a dozen or so redeployments, I get the following in 
> the midst of the deployment:
>
> MemoryError: PermGen space
> java.lang.OutOfMemoryError: PermGen space
>
> When I stop Tomcat and start it up again, it works fine until I have 
> redeployed a dozen times, at which point I get the same error.  Why is 
> this happening?  Am I not redeploying properly?  It seems like a 
> memory lead in Tomcat's deployer.
>
>                         Thanks,
>                         Matthew Patton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>




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