You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kris Rasmussen <kr...@yahoo.com> on 2004/03/13 04:43:42 UTC
Memory Requirements of Tapestry????
I have been developing a large web app with tapestry for the past few months, and during testing I repeatatly reload the web application in tomcat. After some number of reloads I get a java.lang.OutOfMemory exception. Does anyone know why reloading the web app would cause my vm to run out of memory? Also, could someone please let me know what kind of memory a tapestry app requires? My web hosting provider is probably not going to like my app if uses this much memory, especially since I am going to run it on a shared vm.
Kris
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
Re: Memory Requirements of Tapestry????
Posted by Jason Vasquez <ja...@obiwan.homelinux.org>.
FWIW, I see the same problem with Weblogic 8.1
-jason
On Sat, Mar 13, 2004 at 01:33:31PM -0000, John McTeague wrote:
> I use the OC4J container at my work, and also get OutOfMemory errors
> after a few reloads.
>
> -----Original Message-----
> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
> Sent: 13 March 2004 09:32
> To: Tapestry users
> Subject: RE: Memory Requirements of Tapestry????
>
>
> Any bug? care to elaborate. I have used ant to package and deploy the
> application in two ways, one being launching a browser and using the
> manager url, the other being the ant reload task for tomcat.
>
> easy-to-remember@gmx.de wrote:Sounds like the ant bug......
>
> > FWIW, I have this problem too. It shouldn't be a problem for us in
> > production because we'll probably reboot when needed rather than
> > restart, which is fine since we control the environment. However, it
> > does look like there's a bug in either Tomcat's reload functionality,
> > or in Tapestry creating objects and not releasing them in a way which
> > can be GC'ed. Also,
> > I have seen this issue rather consistently in Tomcat 4.x, but I have
> not
> > tested for it in Tomcat 5 yet.
> >
> > -----Original Message-----
> > From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
> > Sent: Friday, March 12, 2004 9:44 PM
> > To: tapestry-user@jakarta.apache.org
> > Subject: Memory Requirements of Tapestry????
> >
> >
> > I have been developing a large web app with tapestry for the past few
> > months, and during testing I repeatatly reload the web application in
> > tomcat. After some number of reloads I get a java.lang.OutOfMemory
> > exception. Does anyone know why reloading the web app would cause my
> > vm to run out of memory? Also, could someone please let me know what
> > kind of memory a tapestry app requires? My web hosting provider is
> > probably not going to like my app if uses this much memory, especially
>
> > since I am going to run it on a shared vm.
> >
> > Kris
> >
> > Do you Yahoo!?
> > Yahoo! Mail - More reliable, more storage, less spam
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
--
-------------------------------------------------------------------
| | |
| Jason Vasquez | When their numbers dwindled from |
| jason@obiwan.homelinux.org | 50 to 8, the other dwarves began |
| http://obiwan.homelinux.org | to suspect Hungry. |
| | |
|------------------------------------------------------------------
| Public Key: http://obiwan.homelinux.org/~jason/pubkey.txt |
-------------------------------------------------------------------
RE: Memory Requirements of Tapestry????
Posted by John McTeague <jo...@shortslant.com>.
I use the OC4J container at my work, and also get OutOfMemory errors
after a few reloads.
-----Original Message-----
From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
Sent: 13 March 2004 09:32
To: Tapestry users
Subject: RE: Memory Requirements of Tapestry????
Any bug? care to elaborate. I have used ant to package and deploy the
application in two ways, one being launching a browser and using the
manager url, the other being the ant reload task for tomcat.
easy-to-remember@gmx.de wrote:Sounds like the ant bug......
> FWIW, I have this problem too. It shouldn't be a problem for us in
> production because we'll probably reboot when needed rather than
> restart, which is fine since we control the environment. However, it
> does look like there's a bug in either Tomcat's reload functionality,
> or in Tapestry creating objects and not releasing them in a way which
> can be GC'ed. Also,
> I have seen this issue rather consistently in Tomcat 4.x, but I have
not
> tested for it in Tomcat 5 yet.
>
> -----Original Message-----
> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
> Sent: Friday, March 12, 2004 9:44 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Memory Requirements of Tapestry????
>
>
> I have been developing a large web app with tapestry for the past few
> months, and during testing I repeatatly reload the web application in
> tomcat. After some number of reloads I get a java.lang.OutOfMemory
> exception. Does anyone know why reloading the web app would cause my
> vm to run out of memory? Also, could someone please let me know what
> kind of memory a tapestry app requires? My web hosting provider is
> probably not going to like my app if uses this much memory, especially
> since I am going to run it on a shared vm.
>
> Kris
>
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Memory Requirements of Tapestry????
Posted by Kris Rasmussen <kr...@yahoo.com>.
Any bug? care to elaborate. I have used ant to package and deploy the application in two ways, one being launching a browser and using the manager url, the other being the ant reload task for tomcat.
easy-to-remember@gmx.de wrote:Sounds like the ant bug......
> FWIW, I have this problem too. It shouldn't be a problem for us in
> production because we'll probably reboot when needed rather than restart,
> which is fine since we control the environment. However, it does look
> like
> there's a bug in either Tomcat's reload functionality, or in Tapestry
> creating objects and not releasing them in a way which can be GC'ed.
> Also,
> I have seen this issue rather consistently in Tomcat 4.x, but I have not
> tested for it in Tomcat 5 yet.
>
> -----Original Message-----
> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
> Sent: Friday, March 12, 2004 9:44 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Memory Requirements of Tapestry????
>
>
> I have been developing a large web app with tapestry for the past few
> months, and during testing I repeatatly reload the web application in
> tomcat. After some number of reloads I get a java.lang.OutOfMemory
> exception. Does anyone know why reloading the web app would cause my vm to
> run out of memory? Also, could someone please let me know what kind of
> memory a tapestry app requires? My web hosting provider is probably not
> going to like my app if uses this much memory, especially since I am going
> to run it on a shared vm.
>
> Kris
>
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
RE: Memory Requirements of Tapestry????
Posted by ea...@gmx.de.
Sounds like the ant bug......
> FWIW, I have this problem too. It shouldn't be a problem for us in
> production because we'll probably reboot when needed rather than restart,
> which is fine since we control the environment. However, it does look
> like
> there's a bug in either Tomcat's reload functionality, or in Tapestry
> creating objects and not releasing them in a way which can be GC'ed.
> Also,
> I have seen this issue rather consistently in Tomcat 4.x, but I have not
> tested for it in Tomcat 5 yet.
>
> -----Original Message-----
> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
> Sent: Friday, March 12, 2004 9:44 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Memory Requirements of Tapestry????
>
>
> I have been developing a large web app with tapestry for the past few
> months, and during testing I repeatatly reload the web application in
> tomcat. After some number of reloads I get a java.lang.OutOfMemory
> exception. Does anyone know why reloading the web app would cause my vm to
> run out of memory? Also, could someone please let me know what kind of
> memory a tapestry app requires? My web hosting provider is probably not
> going to like my app if uses this much memory, especially since I am going
> to run it on a shared vm.
>
> Kris
>
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Memory Requirements of Tapestry????
Posted by Matt Raible <li...@raibledesigns.com>.
Must be a Tomcat thing then - good to know that Resin handles this more
gracefully.
Matt
> -----Original Message-----
> From: Drew Davidson [mailto:drew@ognl.org]
> Sent: Tuesday, March 16, 2004 9:01 AM
> To: Tapestry users
> Subject: Re: Memory Requirements of Tapestry????
>
>
> Matt Raible wrote:
>
> > The OOM errors happen all the time - with all webapps regardless of
> > MVC Framework (IMO). I see it in Struts and I'm willing to bet it
> > happens with WebWork too. My advice - take 10 seconds and
> stop/start
> > Tomcat every 5-6 reloads. I tend to get these about 5
> times per day
> > during heavy development and it takes less time to
> start/stop then to
> > figure out why they're happening. ;-)
> >
> > The Tomcat developers suggest you make your context
> > reloadable="false" in a production environment. The question is -
> > does Resin run into these same types of issues?
>
> I've only gotten one OutOfMemoryException using Resin (2.x).
> The VM was
> clearly exhausted by my code, however, and setting -Xms and -Xmx high
> enough solved it. The servlet reloading has never caused
> such a thing,
> AFAIK, and I do a lot of servlet reloading during development.
>
> - Drew
>
> --
> +---------------------------------+
> < Drew Davidson | OGNL Technology >
> < Professional Open Source >
> +---------------------------------+
> | Email: drew@ognl.org /
> | Web: http://www.ognl.org /
> | Vox: (520) 531-1966 <
> | Fax: (520) 531-1965 \
> | Mobile: (520) 405-2967 \
> +---------------------------------+
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Memory Requirements of Tapestry????
Posted by Drew Davidson <dr...@ognl.org>.
Matt Raible wrote:
> The OOM errors happen all the time - with all webapps regardless of
> MVC Framework (IMO). I see it in Struts and I'm willing to bet it
> happens with WebWork too. My advice - take 10 seconds and stop/start
> Tomcat every 5-6 reloads. I tend to get these about 5 times per day
> during heavy development and it takes less time to start/stop then to
> figure out why they're happening. ;-)
>
> The Tomcat developers suggest you make your context
> reloadable="false" in a production environment. The question is -
> does Resin run into these same types of issues?
I've only gotten one OutOfMemoryException using Resin (2.x). The VM was
clearly exhausted by my code, however, and setting -Xms and -Xmx high
enough solved it. The servlet reloading has never caused such a thing,
AFAIK, and I do a lot of servlet reloading during development.
- Drew
--
+---------------------------------+
< Drew Davidson | OGNL Technology >
< Professional Open Source >
+---------------------------------+
| Email: drew@ognl.org /
| Web: http://www.ognl.org /
| Vox: (520) 531-1966 <
| Fax: (520) 531-1965 \
| Mobile: (520) 405-2967 \
+---------------------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Memory Requirements of Tapestry????
Posted by Matt Raible <li...@raibledesigns.com>.
The OOM errors happen all the time - with all webapps regardless of MVC
Framework (IMO). I see it in Struts and I'm willing to bet it happens
with WebWork too. My advice - take 10 seconds and stop/start Tomcat
every 5-6 reloads. I tend to get these about 5 times per day during
heavy development and it takes less time to start/stop then to figure
out why they're happening. ;-)
The Tomcat developers suggest you make your context reloadable="false"
in a production environment. The question is - does Resin run into
these same types of issues?
Matt
On Mar 16, 2004, at 6:32 AM, Erik Hatcher wrote:
> Could you try this with Tomcat5 and see if the memory issues are still
> present?
>
> Erik
>
>
> On Mar 16, 2004, at 6:44 AM, M. Stellinga wrote:
>
>> I took a look at a Tapestry application with JProfiler running Tomcat
>> 4.1.29. The allocation snapshots showed that certain classes are
>> re-instantiated every time a Tapestry web app is reloaded (eventually
>> causing OutOfMemory errors).
>> I'm not really an expert on the Tomcat memory model, but it appears
>> to me that static fields are not freed upon stopping the servlet and
>> that these static fields are re-initialized when the servlet is
>> re-started. I know that Tomcat uses separate classloaders for each
>> webapp, and my guess is that when classes are reloaded in a new
>> classloader the static fields are re-initialized alongside the old
>> ones (but I could be misinterpreting JProfiler; I'm by no means an
>> expert).
>>
>> Another thing I noticed is that the shared janitor thread is
>> duplicated on each reload. I tried shutting it down manually by
>> overriding the servlet.destroy() method:
>> public class MyApplicationServlet extends ApplicationServlet{
>> public void destroy() {
>> JanitorThread.getSharedJanitorThread().interrupt();
>> super.destroy();
>> }
>> }
>> However, that didn't work. When I looked at the source code, I
>> noticed that the run-method of this thread ignores
>> InterruptedExceptions. I tried calling the deprecated stop() method
>> instead of interrupt() and that does work.
>> I don't know why the janitor thread eats InterruptExceptions, but I
>> don't think it should do that.
>>
>> I hope this helps,
>> Martijn
>>
>> Mindbridge wrote:
>>
>>> There was a bug in Tomcat with freeing resources (memory) that have
>>> been
>>> allocated in the way Tapestry allocates them (which should have been
>>> supported if I remember correctly). I believe that was fixed, but
>>> something
>>> similar would cause the issue with OutOfMemory. I will investigate
>>> the issue
>>> again when I get a chance. If one is interested in solving this
>>> ASAP, he can
>>> run Tomcat though a java profiler, use the Tapestry app a bit, then
>>> remove
>>> it and see if any Tapestry-related resources/classes remain
>>> allocated. With
>>> a snapshot one can even see why.
>>>
>>> Hope this helps,
>>> -mb
>>>
>>> ----- Original Message ----- From: "Vince Platt"
>>> <Vi...@comcast.net>
>>> To: "Tapestry users" <ta...@jakarta.apache.org>
>>> Sent: Saturday, March 13, 2004 9:40 AM
>>> Subject: RE: Memory Requirements of Tapestry????
>>>
>>>
>>>
>>>> FWIW, I have this problem too. It shouldn't be a problem for us in
>>>> production because we'll probably reboot when needed rather than
>>>> restart,
>>>> which is fine since we control the environment. However, it does
>>>> look
>>>>
>>> like
>>>
>>>> there's a bug in either Tomcat's reload functionality, or in
>>>> Tapestry
>>>> creating objects and not releasing them in a way which can be GC'ed.
>>>>
>>> Also,
>>>
>>>> I have seen this issue rather consistently in Tomcat 4.x, but I
>>>> have not
>>>> tested for it in Tomcat 5 yet.
>>>>
>>>> -----Original Message-----
>>>> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
>>>> Sent: Friday, March 12, 2004 9:44 PM
>>>> To: tapestry-user@jakarta.apache.org
>>>> Subject: Memory Requirements of Tapestry????
>>>>
>>>>
>>>> I have been developing a large web app with tapestry for the past
>>>> few
>>>> months, and during testing I repeatatly reload the web application
>>>> in
>>>> tomcat. After some number of reloads I get a java.lang.OutOfMemory
>>>> exception. Does anyone know why reloading the web app would cause
>>>> my vm to
>>>> run out of memory? Also, could someone please let me know what kind
>>>> of
>>>> memory a tapestry app requires? My web hosting provider is probably
>>>> not
>>>> going to like my app if uses this much memory, especially since I
>>>> am going
>>>> to run it on a shared vm.
>>>>
>>>> Kris
>>>>
>>>> Do you Yahoo!?
>>>> Yahoo! Mail - More reliable, more storage, less spam
>>>>
>>>>
>>>> --------------------------------------------------------------------
>>>> -
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail:
>>>> tapestry-user-help@jakarta.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Memory Requirements of Tapestry????
Posted by Kris Rasmussen <kr...@yahoo.com>.
I am no expert with profilling, but the few times i got jprofiller to profile tomcat on my machine (its hard because I am using window me right now and keep running out of environment space with jprofiller), I've found that my web app and probably tapestry in general uses quite a bit of memory. I'm talking 20 40 megs(including tomcat) with only one user accessing the site and no other data loaded in other than the pages and templates.
I have about 10 pages and maybe 15 templates for components, I can't imagine these taking up that much space. Anyone else find that tapestry uses a lot of memory?
Kris
"M. Stellinga" <ta...@softwaredesign.nl> wrote:
Erik Hatcher wrote:
> Could you try this with Tomcat5 and see if the memory issues are still
> present?
>
> Erik
I checked under Tomcat 5.0.16 and the same thing happens. According to
JProfiler, on every reload the classes get reloaded and the static
fields (such as the static CONVERSION_MAP in
org.apache.tapestry.parse.SpecificationParser and the static
_booleanAdapters in org.apache.tapestry.Tapestry) get duplicated.
I haven't tried Tomcat 5.0.19 (I didn't have time to update).
On another note, the janitor thread wasn't terminated under Tomcat 5
either.
Martijn
>
>
> On Mar 16, 2004, at 6:44 AM, M. Stellinga wrote:
>
>> I took a look at a Tapestry application with JProfiler running Tomcat
>> 4.1.29. The allocation snapshots showed that certain classes are
>> re-instantiated every time a Tapestry web app is reloaded (eventually
>> causing OutOfMemory errors).
>> I'm not really an expert on the Tomcat memory model, but it appears
>> to me that static fields are not freed upon stopping the servlet and
>> that these static fields are re-initialized when the servlet is
>> re-started. I know that Tomcat uses separate classloaders for each
>> webapp, and my guess is that when classes are reloaded in a new
>> classloader the static fields are re-initialized alongside the old
>> ones (but I could be misinterpreting JProfiler; I'm by no means an
>> expert).
>>
>> Another thing I noticed is that the shared janitor thread is
>> duplicated on each reload. I tried shutting it down manually by
>> overriding the servlet.destroy() method:
>> public class MyApplicationServlet extends ApplicationServlet{
>> public void destroy() {
>> JanitorThread.getSharedJanitorThread().interrupt();
>> super.destroy();
>> }
>> }
>> However, that didn't work. When I looked at the source code, I
>> noticed that the run-method of this thread ignores
>> InterruptedExceptions. I tried calling the deprecated stop() method
>> instead of interrupt() and that does work.
>> I don't know why the janitor thread eats InterruptExceptions, but I
>> don't think it should do that.
>>
>> I hope this helps,
>> Martijn
>>
>> Mindbridge wrote:
>>
>>> There was a bug in Tomcat with freeing resources (memory) that have
>>> been
>>> allocated in the way Tapestry allocates them (which should have been
>>> supported if I remember correctly). I believe that was fixed, but
>>> something
>>> similar would cause the issue with OutOfMemory. I will investigate
>>> the issue
>>> again when I get a chance. If one is interested in solving this
>>> ASAP, he can
>>> run Tomcat though a java profiler, use the Tapestry app a bit, then
>>> remove
>>> it and see if any Tapestry-related resources/classes remain
>>> allocated. With
>>> a snapshot one can even see why.
>>>
>>> Hope this helps,
>>> -mb
>>>
>>> ----- Original Message ----- From: "Vince Platt"
>>>
>>> To: "Tapestry users"
>>> Sent: Saturday, March 13, 2004 9:40 AM
>>> Subject: RE: Memory Requirements of Tapestry????
>>>
>>>
>>>
>>>> FWIW, I have this problem too. It shouldn't be a problem for us in
>>>> production because we'll probably reboot when needed rather than
>>>> restart,
>>>> which is fine since we control the environment. However, it does look
>>>>
>>> like
>>>
>>>> there's a bug in either Tomcat's reload functionality, or in Tapestry
>>>> creating objects and not releasing them in a way which can be GC'ed.
>>>>
>>> Also,
>>>
>>>> I have seen this issue rather consistently in Tomcat 4.x, but I
>>>> have not
>>>> tested for it in Tomcat 5 yet.
>>>>
>>>> -----Original Message-----
>>>> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
>>>> Sent: Friday, March 12, 2004 9:44 PM
>>>> To: tapestry-user@jakarta.apache.org
>>>> Subject: Memory Requirements of Tapestry????
>>>>
>>>>
>>>> I have been developing a large web app with tapestry for the past few
>>>> months, and during testing I repeatatly reload the web application in
>>>> tomcat. After some number of reloads I get a java.lang.OutOfMemory
>>>> exception. Does anyone know why reloading the web app would cause
>>>> my vm to
>>>> run out of memory? Also, could someone please let me know what kind of
>>>> memory a tapestry app requires? My web hosting provider is probably
>>>> not
>>>> going to like my app if uses this much memory, especially since I
>>>> am going
>>>> to run it on a shared vm.
>>>>
>>>> Kris
>>>>
>>>> Do you Yahoo!?
>>>> Yahoo! Mail - More reliable, more storage, less spam
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
Re: Memory Requirements of Tapestry????
Posted by "M. Stellinga" <ta...@softwaredesign.nl>.
Erik Hatcher wrote:
> Could you try this with Tomcat5 and see if the memory issues are still
> present?
>
> Erik
I checked under Tomcat 5.0.16 and the same thing happens. According to
JProfiler, on every reload the classes get reloaded and the static
fields (such as the static CONVERSION_MAP in
org.apache.tapestry.parse.SpecificationParser and the static
_booleanAdapters in org.apache.tapestry.Tapestry) get duplicated.
I haven't tried Tomcat 5.0.19 (I didn't have time to update).
On another note, the janitor thread wasn't terminated under Tomcat 5
either.
Martijn
>
>
> On Mar 16, 2004, at 6:44 AM, M. Stellinga wrote:
>
>> I took a look at a Tapestry application with JProfiler running Tomcat
>> 4.1.29. The allocation snapshots showed that certain classes are
>> re-instantiated every time a Tapestry web app is reloaded (eventually
>> causing OutOfMemory errors).
>> I'm not really an expert on the Tomcat memory model, but it appears
>> to me that static fields are not freed upon stopping the servlet and
>> that these static fields are re-initialized when the servlet is
>> re-started. I know that Tomcat uses separate classloaders for each
>> webapp, and my guess is that when classes are reloaded in a new
>> classloader the static fields are re-initialized alongside the old
>> ones (but I could be misinterpreting JProfiler; I'm by no means an
>> expert).
>>
>> Another thing I noticed is that the shared janitor thread is
>> duplicated on each reload. I tried shutting it down manually by
>> overriding the servlet.destroy() method:
>> public class MyApplicationServlet extends ApplicationServlet{
>> public void destroy() {
>> JanitorThread.getSharedJanitorThread().interrupt();
>> super.destroy();
>> }
>> }
>> However, that didn't work. When I looked at the source code, I
>> noticed that the run-method of this thread ignores
>> InterruptedExceptions. I tried calling the deprecated stop() method
>> instead of interrupt() and that does work.
>> I don't know why the janitor thread eats InterruptExceptions, but I
>> don't think it should do that.
>>
>> I hope this helps,
>> Martijn
>>
>> Mindbridge wrote:
>>
>>> There was a bug in Tomcat with freeing resources (memory) that have
>>> been
>>> allocated in the way Tapestry allocates them (which should have been
>>> supported if I remember correctly). I believe that was fixed, but
>>> something
>>> similar would cause the issue with OutOfMemory. I will investigate
>>> the issue
>>> again when I get a chance. If one is interested in solving this
>>> ASAP, he can
>>> run Tomcat though a java profiler, use the Tapestry app a bit, then
>>> remove
>>> it and see if any Tapestry-related resources/classes remain
>>> allocated. With
>>> a snapshot one can even see why.
>>>
>>> Hope this helps,
>>> -mb
>>>
>>> ----- Original Message ----- From: "Vince Platt"
>>> <Vi...@comcast.net>
>>> To: "Tapestry users" <ta...@jakarta.apache.org>
>>> Sent: Saturday, March 13, 2004 9:40 AM
>>> Subject: RE: Memory Requirements of Tapestry????
>>>
>>>
>>>
>>>> FWIW, I have this problem too. It shouldn't be a problem for us in
>>>> production because we'll probably reboot when needed rather than
>>>> restart,
>>>> which is fine since we control the environment. However, it does look
>>>>
>>> like
>>>
>>>> there's a bug in either Tomcat's reload functionality, or in Tapestry
>>>> creating objects and not releasing them in a way which can be GC'ed.
>>>>
>>> Also,
>>>
>>>> I have seen this issue rather consistently in Tomcat 4.x, but I
>>>> have not
>>>> tested for it in Tomcat 5 yet.
>>>>
>>>> -----Original Message-----
>>>> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
>>>> Sent: Friday, March 12, 2004 9:44 PM
>>>> To: tapestry-user@jakarta.apache.org
>>>> Subject: Memory Requirements of Tapestry????
>>>>
>>>>
>>>> I have been developing a large web app with tapestry for the past few
>>>> months, and during testing I repeatatly reload the web application in
>>>> tomcat. After some number of reloads I get a java.lang.OutOfMemory
>>>> exception. Does anyone know why reloading the web app would cause
>>>> my vm to
>>>> run out of memory? Also, could someone please let me know what kind of
>>>> memory a tapestry app requires? My web hosting provider is probably
>>>> not
>>>> going to like my app if uses this much memory, especially since I
>>>> am going
>>>> to run it on a shared vm.
>>>>
>>>> Kris
>>>>
>>>> Do you Yahoo!?
>>>> Yahoo! Mail - More reliable, more storage, less spam
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Memory Requirements of Tapestry????
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Could you try this with Tomcat5 and see if the memory issues are still
present?
Erik
On Mar 16, 2004, at 6:44 AM, M. Stellinga wrote:
> I took a look at a Tapestry application with JProfiler running Tomcat
> 4.1.29. The allocation snapshots showed that certain classes are
> re-instantiated every time a Tapestry web app is reloaded (eventually
> causing OutOfMemory errors).
> I'm not really an expert on the Tomcat memory model, but it appears
> to me that static fields are not freed upon stopping the servlet and
> that these static fields are re-initialized when the servlet is
> re-started. I know that Tomcat uses separate classloaders for each
> webapp, and my guess is that when classes are reloaded in a new
> classloader the static fields are re-initialized alongside the old
> ones (but I could be misinterpreting JProfiler; I'm by no means an
> expert).
>
> Another thing I noticed is that the shared janitor thread is
> duplicated on each reload. I tried shutting it down manually by
> overriding the servlet.destroy() method:
> public class MyApplicationServlet extends ApplicationServlet{
> public void destroy() {
> JanitorThread.getSharedJanitorThread().interrupt();
> super.destroy();
> }
> }
> However, that didn't work. When I looked at the source code, I noticed
> that the run-method of this thread ignores InterruptedExceptions. I
> tried calling the deprecated stop() method instead of interrupt() and
> that does work.
> I don't know why the janitor thread eats InterruptExceptions, but I
> don't think it should do that.
>
> I hope this helps,
> Martijn
>
> Mindbridge wrote:
>
>> There was a bug in Tomcat with freeing resources (memory) that have
>> been
>> allocated in the way Tapestry allocates them (which should have been
>> supported if I remember correctly). I believe that was fixed, but
>> something
>> similar would cause the issue with OutOfMemory. I will investigate
>> the issue
>> again when I get a chance. If one is interested in solving this ASAP,
>> he can
>> run Tomcat though a java profiler, use the Tapestry app a bit, then
>> remove
>> it and see if any Tapestry-related resources/classes remain
>> allocated. With
>> a snapshot one can even see why.
>>
>> Hope this helps,
>> -mb
>>
>> ----- Original Message ----- From: "Vince Platt"
>> <Vi...@comcast.net>
>> To: "Tapestry users" <ta...@jakarta.apache.org>
>> Sent: Saturday, March 13, 2004 9:40 AM
>> Subject: RE: Memory Requirements of Tapestry????
>>
>>
>>
>>> FWIW, I have this problem too. It shouldn't be a problem for us in
>>> production because we'll probably reboot when needed rather than
>>> restart,
>>> which is fine since we control the environment. However, it does
>>> look
>>>
>> like
>>
>>> there's a bug in either Tomcat's reload functionality, or in Tapestry
>>> creating objects and not releasing them in a way which can be GC'ed.
>>>
>> Also,
>>
>>> I have seen this issue rather consistently in Tomcat 4.x, but I have
>>> not
>>> tested for it in Tomcat 5 yet.
>>>
>>> -----Original Message-----
>>> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
>>> Sent: Friday, March 12, 2004 9:44 PM
>>> To: tapestry-user@jakarta.apache.org
>>> Subject: Memory Requirements of Tapestry????
>>>
>>>
>>> I have been developing a large web app with tapestry for the past few
>>> months, and during testing I repeatatly reload the web application in
>>> tomcat. After some number of reloads I get a java.lang.OutOfMemory
>>> exception. Does anyone know why reloading the web app would cause my
>>> vm to
>>> run out of memory? Also, could someone please let me know what kind
>>> of
>>> memory a tapestry app requires? My web hosting provider is probably
>>> not
>>> going to like my app if uses this much memory, especially since I am
>>> going
>>> to run it on a shared vm.
>>>
>>> Kris
>>>
>>> Do you Yahoo!?
>>> Yahoo! Mail - More reliable, more storage, less spam
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> tapestry-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Memory Requirements of Tapestry????
Posted by "M. Stellinga" <ta...@softwaredesign.nl>.
I took a look at a Tapestry application with JProfiler running Tomcat
4.1.29. The allocation snapshots showed that certain classes are
re-instantiated every time a Tapestry web app is reloaded (eventually
causing OutOfMemory errors).
I'm not really an expert on the Tomcat memory model, but it appears to
me that static fields are not freed upon stopping the servlet and that
these static fields are re-initialized when the servlet is re-started. I
know that Tomcat uses separate classloaders for each webapp, and my
guess is that when classes are reloaded in a new classloader the static
fields are re-initialized alongside the old ones (but I could be
misinterpreting JProfiler; I'm by no means an expert).
Another thing I noticed is that the shared janitor thread is duplicated
on each reload. I tried shutting it down manually by overriding the
servlet.destroy() method:
public class MyApplicationServlet extends ApplicationServlet{
public void destroy() {
JanitorThread.getSharedJanitorThread().interrupt();
super.destroy();
}
}
However, that didn't work. When I looked at the source code, I noticed
that the run-method of this thread ignores InterruptedExceptions. I
tried calling the deprecated stop() method instead of interrupt() and
that does work.
I don't know why the janitor thread eats InterruptExceptions, but I
don't think it should do that.
I hope this helps,
Martijn
Mindbridge wrote:
>There was a bug in Tomcat with freeing resources (memory) that have been
>allocated in the way Tapestry allocates them (which should have been
>supported if I remember correctly). I believe that was fixed, but something
>similar would cause the issue with OutOfMemory. I will investigate the issue
>again when I get a chance. If one is interested in solving this ASAP, he can
>run Tomcat though a java profiler, use the Tapestry app a bit, then remove
>it and see if any Tapestry-related resources/classes remain allocated. With
>a snapshot one can even see why.
>
>Hope this helps,
>-mb
>
>----- Original Message -----
>From: "Vince Platt" <Vi...@comcast.net>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Sent: Saturday, March 13, 2004 9:40 AM
>Subject: RE: Memory Requirements of Tapestry????
>
>
>
>
>>FWIW, I have this problem too. It shouldn't be a problem for us in
>>production because we'll probably reboot when needed rather than restart,
>>which is fine since we control the environment. However, it does look
>>
>>
>like
>
>
>>there's a bug in either Tomcat's reload functionality, or in Tapestry
>>creating objects and not releasing them in a way which can be GC'ed.
>>
>>
>Also,
>
>
>>I have seen this issue rather consistently in Tomcat 4.x, but I have not
>>tested for it in Tomcat 5 yet.
>>
>>-----Original Message-----
>>From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
>>Sent: Friday, March 12, 2004 9:44 PM
>>To: tapestry-user@jakarta.apache.org
>>Subject: Memory Requirements of Tapestry????
>>
>>
>>I have been developing a large web app with tapestry for the past few
>>months, and during testing I repeatatly reload the web application in
>>tomcat. After some number of reloads I get a java.lang.OutOfMemory
>>exception. Does anyone know why reloading the web app would cause my vm to
>>run out of memory? Also, could someone please let me know what kind of
>>memory a tapestry app requires? My web hosting provider is probably not
>>going to like my app if uses this much memory, especially since I am going
>>to run it on a shared vm.
>>
>>Kris
>>
>>Do you Yahoo!?
>>Yahoo! Mail - More reliable, more storage, less spam
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Memory Requirements of Tapestry????
Posted by Mindbridge <mi...@yahoo.com>.
There was a bug in Tomcat with freeing resources (memory) that have been
allocated in the way Tapestry allocates them (which should have been
supported if I remember correctly). I believe that was fixed, but something
similar would cause the issue with OutOfMemory. I will investigate the issue
again when I get a chance. If one is interested in solving this ASAP, he can
run Tomcat though a java profiler, use the Tapestry app a bit, then remove
it and see if any Tapestry-related resources/classes remain allocated. With
a snapshot one can even see why.
Hope this helps,
-mb
----- Original Message -----
From: "Vince Platt" <Vi...@comcast.net>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Saturday, March 13, 2004 9:40 AM
Subject: RE: Memory Requirements of Tapestry????
> FWIW, I have this problem too. It shouldn't be a problem for us in
> production because we'll probably reboot when needed rather than restart,
> which is fine since we control the environment. However, it does look
like
> there's a bug in either Tomcat's reload functionality, or in Tapestry
> creating objects and not releasing them in a way which can be GC'ed.
Also,
> I have seen this issue rather consistently in Tomcat 4.x, but I have not
> tested for it in Tomcat 5 yet.
>
> -----Original Message-----
> From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
> Sent: Friday, March 12, 2004 9:44 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Memory Requirements of Tapestry????
>
>
> I have been developing a large web app with tapestry for the past few
> months, and during testing I repeatatly reload the web application in
> tomcat. After some number of reloads I get a java.lang.OutOfMemory
> exception. Does anyone know why reloading the web app would cause my vm to
> run out of memory? Also, could someone please let me know what kind of
> memory a tapestry app requires? My web hosting provider is probably not
> going to like my app if uses this much memory, especially since I am going
> to run it on a shared vm.
>
> Kris
>
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Memory Requirements of Tapestry????
Posted by Vince Platt <Vi...@comcast.net>.
FWIW, I have this problem too. It shouldn't be a problem for us in
production because we'll probably reboot when needed rather than restart,
which is fine since we control the environment. However, it does look like
there's a bug in either Tomcat's reload functionality, or in Tapestry
creating objects and not releasing them in a way which can be GC'ed. Also,
I have seen this issue rather consistently in Tomcat 4.x, but I have not
tested for it in Tomcat 5 yet.
-----Original Message-----
From: Kris Rasmussen [mailto:kristapestry@yahoo.com]
Sent: Friday, March 12, 2004 9:44 PM
To: tapestry-user@jakarta.apache.org
Subject: Memory Requirements of Tapestry????
I have been developing a large web app with tapestry for the past few
months, and during testing I repeatatly reload the web application in
tomcat. After some number of reloads I get a java.lang.OutOfMemory
exception. Does anyone know why reloading the web app would cause my vm to
run out of memory? Also, could someone please let me know what kind of
memory a tapestry app requires? My web hosting provider is probably not
going to like my app if uses this much memory, especially since I am going
to run it on a shared vm.
Kris
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org