Hello All, We were running into the problem of Tomcat not shutting down correctly and leaving a hanging process. This was due to a Thread that was started that was not a daemon thread, however not in the Jetspeed code, our code. Jetspeed did have a similar problem at one point, but this has been resolved in newer versions. This was fixed by simply making the Thread daemon.
Not sure what to do about HSQL. I know that unless all Connection objects have been closed HSQL will not allow the VM to exit. This would be a cause for Tomcat to hang at shutdown. Not sure why a reload would cause the problem though. In our production environment we need to use the Tomcat manager to deploy and undeploy Jetspeeds. We have also run into the problem that by the 4th or 5th redeploy we get the OutOfMemoryError. A restart of Tomcat will resolve the problem, however it would be nice not to have to do that. Our initial investigation led us to find that around 7 Daemon Threads that were started in Jetspeed/Turbine did not stop when the ServletContext was destroyed. We thought that the daemon threads that were running were pinning a large object graph, eventually causing the OutOfMemoryError. We managed to stop all of these threads when the ServletContext was destroyed however this did not help our OutOfMemoryError. There was a good lesson to be learned from this, don't start Threads in a webapp. This is because you don't know the Lifecycle of the application. Daemon threads are fine if the lifecycle is the VM, in this case it was not the VM but the ServletContext. The threads had be to made aware of the ServletContext lifecycle. The Daemon Threads that were not stopped were occasionally throwing a Class Def Not Found Exception as well. This is because the WebAppClassLoader that the daemon threads were running in got "cut off" from the rest of the ClassLoader hierarchy when it was undeployed. When one of those Daemon threads woke up from its wait() it couldn't access needed classes from the System ClassLoader to run its code, throwing the exception. We have not yet solved the OutOfMemoryError. I am beginning to think that this is not a bug in Jetspeed, but Tomcat. This was reinforced by Scott mentioning that the OutOfMemoryError is possible with Struts as well. If anyone has any other ideas let me know. I would like to be able to do endless redeploys and not run out of memory. -James Norman -----Original Message----- From: Weaver, Scott [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 10:14 AM To: 'Jetspeed Users List' Subject: RE: Sessions and Restarting Jetspeed Ryan, I use eclipse/Sysdeo pluggin with jdk 1.4.1 and hot class reloading. I rarely have to restart. I have found that tomcat resource reloading can be buggy, even outside of turbine/jetspeed. I have had a couple of very basic Struts apps crap out on me after 3 or 4 reloads with an "out of memory" or "no class def found" exceptions. -scott > -----Original Message----- > From: Ryan Christianson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 12, 2003 12:03 PM > To: Jetspeed Users List > Subject: Re: Sessions and Restarting Jetspeed > > To me it seems that when the manager restarts the jetspeed context, some > memory is left tied up somewhere in the jvm. I am guessing that it is > one of the services out side of the servlet container, like in a service > (duh right?).I did a bug search for memory related issues and found this > bug: > > http://issues.apache.org/bugzilla/show_bug.cgi?id=6839 > > Which is what makes me think that is a service related issue. > > This other bug: > http://issues.apache.org/bugzilla/show_bug.cgi?id=16112 > > Pointed to to a new cvs fix for the file: > CastorPSMLManagerService > > Which I applied, a recompiled. This was all a week ago, and I am still > having the problem. > > How do other people actively develop with jetspeed? I run other > applications on my tomcat server, so its annoying to bring down the > tomcat server completely. Also, using the ant tasks to reload jetspeed > is so convent. > > > > Jacob Kjome wrote: > > >Hello Ryan, > > > >Seems to me that when I ran into problems after restarting the app via > >the Tomcat manager app, the problem was that Jetspeed was not able to > >write stuff to the hsqldb database files because another process had a > >handle on those files. Restarting Tomcat fully resolves this issue. > >So, it seems as if hsqldb isn't releasing the files when it is shut > >down. Somehow the JVM keeps a handle on the files. Is this what > >people are seeing and confusing it with session problems or am I just > >seeing a completely different issue here? > > > >Jake > > > >Wednesday, March 12, 2003, 10:26:21 AM, you wrote: > > > >RC> I get the same problem, and sometimes I get a horrible exception, > >RC> sometimes and out of memory error. This usually happens after I use > the > >RC> manger app to reload the application about 8-10 times. If I stop > tomcat, > >RC> then start it back up problems go away. > > > >RC> Mark Orciuch wrote: > > > > > > > >>>I believe this has to do with Tomcat attempting to restore the sessions > upon > >>>restart. Here are some related posts: > >>> > >>>http://www.mail-archive.com/jetspeed- > [EMAIL PROTECTED]/msg07902.html > >>>http://www.mail-archive.com/turbine- > user%40jakarta.apache.org/msg11325.html > >>> > >>>Best regards, > >>> > >>>Mark Orciuch - [EMAIL PROTECTED] > >>>Jakarta Jetspeed - Enterprise Portal in Java > >>>http://jakarta.apache.org/jetspeed/ > >>> > >>> > >>> > >>> > >>> > >>>>-----Original Message----- > >>>>From: Jarrell, Maury [mailto:[EMAIL PROTECTED] > >>>>Sent: Wednesday, March 12, 2003 8:45 AM > >>>>To: 'Jetspeed Users List' > >>>>Subject: Sessions and Restarting Jetspeed > >>>> > >>>> > >>>>Hello all, > >>>> > >>>>I've been lurking on this list for quite some time and appreciate all > the > >>>>help people provide here. > >>>> > >>>>I've been tinkering with Jetspeed ( 1.4b3 on Tomcat 4.12 ): setting > up > >>>>simple HTML portlets in the registry and such. To do this I > >>>>first tried the > >>>>manager app in Tomcat to shutdown Jetspeed, make my changes and > >>>>then restart > >>>>Jetspeed. Later I tried shutting down Tomcat altogether, making > changes, > >>>>and then restarting. When I try to log back in to Jetspeed, I > >>>>get "Horrible > >>>>Exception Errors" that I surmise are the result of my browser > >>>>hanging on to > >>>>a session id or some such that the new instance of Jetspeed knows > nothing > >>>>about. It takes several minutes before I'm able to connect again > >>>>and it is > >>>>slowing my progress significantly. I'm sure there is a silly thing > I'm > >>>>overlooking, but need a nudge in the right direction. So my > >>>>questions are: > >>>>1. Is my guess correct, or is something else going on? and 2. How > can I > >>>>overcome this nuisance? > >>>> > >>>>Thanks, > >>>>Maury Jarrell > >>>> > >>>> > >>>> > >>>> > >>>>-------------------------------------------------------------------- - > >>>>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] > >>> > >>> > >>> > >>> > >>> > > > > > > > >RC> --------------------------------------------------------------------- > >RC> To unsubscribe, e-mail: [EMAIL PROTECTED] > >RC> For additional commands, e-mail: jetspeed-user- > [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]
