Hello, I just ran into a problem related to this thread. I have a class with 30 unit tests which tests a HiveMind service used by my Tapestry pages. About midway through execution I get a : java.lang.OutOfMemoryError: Java heap space. I guess I am doing something wrong. I know just enough about HiveMind to be dangerous.
Regards, -Ryan On Monday, July 24, 2006, at 11:01AM, Martin Strand <[EMAIL PROTECTED]> wrote: >What I meant is that the redeploy ant task you mentioned likely causes the >same error as Eclipse's hot redeploy - old unused classes are still left >in permgen space. Restarting tomcat rather than redeploying would probably >cure the problem. > >Also, if you check google: >http://www.google.com/search?num=25&hl=en&lr=&client=opera&rls=en&q=redeploy+OutOfMemoryError+PermGen&btnG=Search > >you end up with a recent article on the subject: >http://www.jroller.com/page/agileanswers?entry=preventing_java_s_java_lang > >where the guy suggests jrockit instead, but you said you already tried >that... :\ >But someone else there says "After upgrading to jdk1.5.0_07 my Perm Gen >Space gets gc'ed like it should be - no increase of Perm Gen Space, no >code changes." so perhaps you could give update 7 a try. > >Martin > >On Mon, 24 Jul 2006 18:56:48 +0200, <[EMAIL PROTECTED]> wrote: > >> This is in a production environment. There isn't any hot deploying >> happening. We just let the application run. >> >> Our production environment virtual machine args: >> -Xms128m -Xmx1024m -Dorg.apache.tapestry.disable-caching=false >> -XX:MaxPermSize=128m >> >> I don't know how much larger the PermSize can be. >> >> Thanks for your help. >> >> >> -----Original Message----- >> From: Martin Strand [mailto:[EMAIL PROTECTED] >> Sent: Monday, July 24, 2006 10:31 AM >> To: Tapestry users >> Subject: Re: PermGen space - Caching is ON >> >> Hot redeploy is when you edit your code in Eclipse and Eclipse >> automatically adds the new classes to the running JVM and reloads the >> context. That would leave the old classes in the classloader, eventually >> leading to the OOM error you're seeing. >> >> I'm far from an expert on the subject, but redeploying probably doesn't >> unload any classes so every redeploy would be the same as uncaching all >> Tapestry pages/components. You're sort of running Tapestry with >> "org.apache.tapestry.disable-caching" set to somewhere between true and >> false. ;) If you don't ever redeploy your app, just deploy it once and >> then let it run, do you still get that error? >> >> Martin >> >> On Mon, 24 Jul 2006 17:42:54 +0200, Henri Dupre <[EMAIL PROTECTED]> >> wrote: >> >>> Yes I've seen the same issue on linux and windows with all JDKs using >>> Tomcat or JBoss. >>> I'd be curious to know if other containers such as Jetty, Weblogic or >>> Websphere have better solutions... >>> I'm not sure what do you refer as "hot redeploy"... We are using the >>> tomcat ant tasks to redeploy into tomcat. >>> >>> Henri. >>> >>> >>> On 7/24/06, Martin Strand <[EMAIL PROTECTED]> wrote: >>>> >>>> So you're seeing this in your production environment, not only when >>>> you hot redeploy from Eclipse? >>>> >>>> Martin >>>> >>>> On Mon, 24 Jul 2006 03:50:17 +0200, Harvey, David >>>> <[EMAIL PROTECTED]> wrote: >>>> >>>> > Thanks for your comments, discussion. However, this occurs when >>>> caching >>>> > is turned on, i.e. >>>> > -Dorg.apache.tapestry.disable-caching=false. >>>> > >>>> > I sure hope there's a fix, I don't know if MaxPermSize can be made >>>> > any larger in production and it sounds from your discussion that >>>> > making it larger will just delay the OOM condition anyway. >>>> > >>>> > Anybody else have any ideas? >>>> > >>>> > -----Original Message----- >>>> > From: James Carman [mailto:[EMAIL PROTECTED] >>>> > Sent: Sunday, July 23, 2006 6:03 AM >>>> > To: Tapestry users >>>> > Subject: Re: PermGen space >>>> > >>>> > Actually, Tapestry (and HiveMind as well) uses Javassist to >>>> > generate classes at runtime, but all the rest is still true with >>>> > Javassist as >>>> it >>>> > is with CGLIB (hibernate uses CGLIB). As Martin said, enabling >>>> caching >>>> > should fix the problem. Tapestry will only generate (and cache) >>>> > the classes for each page/component one time with caching enabled. >>>> > In a production environment, you really shouldn't run into this, >>>> > since you would have caching enabled and you wouldn't be hot >>>> > redeploying your application. >>>> > >>>> > James >>>> > >>>> >> Hi all, >>>> >> This problem is very common with Tapestry applications. This is >>>> >> due >>>> to >>>> >> the fact that Tapestry uses cglib to generate classes at runtime. >>>> >> Java uses a separate Heap space called "PermGenSpace" to put >>>> meta-data >>>> >> about classes, which is never garbage collected (this is "normal" >>>> >> since normally, classes never change...) but with cglib, classes >>>> >> are generated, which add to the PermGenSpace. And the next time >>>> >> your application is deployed, new classes are generated which add >>>> >> to the PermGenSpace, etc... So it fills and become full. >>>> >> So this problem is common to Java+Tapestry/cglib+deployed webapps. >>>> >> I hope this explaination is clear. Else ask questions. >>>> >> -jec >>>> >> >>>> >> Harvey, David a écrit : >>>> >>> Hello all, >>>> >>> >>>> >>> We've been having occasional problems with PermGen out of space >>>> >>> errors thrown during the execution of our Tapestry application. >>>> >>> We usually get a stack trace with something about hivemind at the >>>> >>> top (see below). >>>> >>> Then, of course, we have to restart our app server. Our >>>> >>> environment is >>>> >>> >>>> >>> Tapestry 4.0.1 and Tacos4-Beta3 >>>> >>> Jboss 4.0.3 sp1 (Tomcat 5.5 embedded) JRE 1.5.0_03 >>>> >>> >>>> >>> The java runtime is initialized with -XX:PermSize=96M >>>> >>> -XX:MaxPermSize=128M >>>> >>> >>>> >>> The stack trace we get at various times is: >>>> >>> >>>> >>> 2006-07-20 17:25:11,415 ERROR >>>> >>> [net.sf.tacos.ajax.impl.AjaxDirectServiceImpl] Error invoking >>>> >>> listener on component $AjaxForm_40 >>>> >>> org.apache.hivemind.ApplicationRuntimeException: PermGen space >>>> >>> [context:/WEB-INF/pages/claims/addEdit.page, line 6, column 93] >>>> >>> at >>>> >>> >>>> org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java: >>>> >>> 461 >>>> >>> ) >>>> >>> at >>>> >>> net.sf.tacos.ajax.components.AjaxForm.trigger(AjaxForm.java:418) >>>> >>> at >>>> >>> >>>> net.sf.tacos.ajax.impl.AjaxDirectServiceImpl.triggerComponent(AjaxDir >>>> >>> ect >>>> >>> ServiceImpl.java:348) >>>> >>> . >>>> >>> . >>>> >>> . >>>> >>> >>>> >>> Caused by: java.lang.OutOfMemoryError: PermGen space >>>> >>> >>>> >>> >>>> >>> Anybody have any clues as to what we can do about this? >>>> >>> >>>> >>> Regards, >>>> >>> David Harvey >>>> >>> Ingenix, Inc. >>>> >>> >>>> >>> "Secure Server BSK" made the following annotations on 07/21/2006 >>>> >>> 03:28:13 PM ------------------------------"This e-mail, including >>>> >>> attachments, may include confidential and/or proprietary >>>> information, >>>> >>> and may be used only by the person or entity to which it is >>>> >>> addressed. If the reader of this e-mail is not the intended >>>> recipient >>>> >>> or his or her authorized agent, the reader is hereby notified >>>> >>> that any dissemination, distribution or copying of this e-mail is >>>> >>> prohibited. If you have received this e-mail in error, please >>>> >>> notify the sender by replying to this message and delete this >>>> >>> e-mail immediately." >>>> >>> ============================== >>>> >>> >>>> >>> >>>> --------------------------------------------------------------------- >>>> >>> 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] >>>> >> >>>> > >>>> > >>>> > James Carman, President >>>> > Carman Consulting, Inc. >>>> > >>>> > >>>> > ------------------------------------------------------------------- >>>> > -- To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> > For additional commands, e-mail: [EMAIL PROTECTED] >>>> > >>>> > >>>> > >>>> > >>>> > "Secure Server BSK" made the following annotations on 07/23/2006 >>>> > 09:50:20 PM ------------------------------"This e-mail, including >>>> > attachments, may include confidential and/or proprietary >>>> > information, and may be used only by the person or entity to which >>>> > it is addressed. If the reader >>>> of >>>> > this e-mail is not the intended recipient or his or her authorized >>>> > agent, the reader is hereby notified that any dissemination, >>>> > distribution or copying of this e-mail is prohibited. If you have >>>> > received this e-mail in error, please notify the sender by replying >>>> > to this message and delete this e-mail immediately." >>>> > ============================== >>>> > >>>> > ------------------------------------------------------------------- >>>> > -- 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] >>>> >>>> >>> >>> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> "Secure Server GDV" made the following >> annotations on 07/24/2006 12:17:51 PM >> ------------------------------"This e-mail, including attachments, may >> include confidential and/or proprietary information, and may be used >> only by the person or entity to which it is addressed. If the reader of >> this e-mail is not the intended recipient or his or her authorized >> agent, the reader is hereby notified that any dissemination, >> distribution or copying of this e-mail is prohibited. If you have >> received this e-mail in error, please notify the sender by replying to >> this message and delete this e-mail immediately." >> ============================== >> >> --------------------------------------------------------------------- >> 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] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]