Re: MemoryError: PermGen space after several redeployments

2005-02-08 Thread Peter Rossbach
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: MemoryError: PermGen space after several redeployments

2005-02-08 Thread Remy Maucherat
On Tue, 08 Feb 2005 11:26:50 +0100, Peter Rossbach [EMAIL PROTECTED] 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.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]