You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ryan Phelan <ry...@verizon.net> on 2005/05/31 05:01:32 UTC

Tapestry and OutOfMemoryError

When the J2EE server is run with the JVM arguments
-Dorg.apache.tapestry.disable-caching=true, does tapestry keep creating
objects and not Garbage collect them? When I have the argument set, I
get OutOfMemoryErrors when developing my code after working with my web
application for about 5 mins. Anyone have OutOfMemoryErrors when using
Tapestry?
Thank you!

Ryan 

Re: Tapestry and OutOfMemoryError

Posted by Michael Musson <mu...@gmail.com>.
I am definitely seeing this problem also. I have to finish code for a
deadline, but tracking this down was next on my list. It does seem
that the problem does not occur when disable-caching is false, but I
need to make sure before this app goes into production for a large
number of users.

As for the advice above about increasing the max memory limit (Xmx) I
would caution that this is not a very good thing to do in general for
your JVM settings unless you are sure that you application really
needs all of that memory for its working set. I have spent more time
than I wanted on Java performance tuning, but I have found that giving
too much memory to a JVM can hurt performance almost as much as not
giving enough.

On 5/31/05, Marcus Brito <mb...@gmail.com> wrote:
> >       I see, that is very helpful to me to see that someone else has
> > the error too.

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


Re: Tapestry and OutOfMemoryError

Posted by Marcus Brito <mb...@gmail.com>.
> 	I see, that is very helpful to me to see that someone else has
> the error too. Did you guys ever find out what the actual cause is? Like
> you, I'm suspecting that it has something to do with tapestry debug mode
> (caching.disabled=true), because it works *endless* as you said when set
> to "false", and errors out when set to "true". Would be good to know :)

A good profiler would help you to find your "big" objects, as well as the GC
roots for these objects (ie, what's holding them alive). Have you tried running
your application through a profiler like, let's say, YJP?

-- Marcus Brito


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


RE: Tapestry and OutOfMemoryError

Posted by Markus Eberle <Ma...@tngtech.com>.
Hi,

we have not found out what the problem is, but we suspect, that is something
about the object creation, as the application runs out of heapspace.
It seems, that the exception occurs earlier if you create a lot of
components/objects. eg. we have tables with > 3000 rows and 10+ columns and
after 3-5 calls to pages containing these tables the exception occurs.

Cheers,
    Markus

> Markus,
>
> 	I see, that is very helpful to me to see that someone else has
> the error too. Did you guys ever find out what the actual cause is? Like
> you, I'm suspecting that it has something to do with tapestry debug mode
> (caching.disabled=true), because it works *endless* as you said when set
> to "false", and errors out when set to "true". Would be good to know :)
>
> Thanks much!
>
> -----Original Message-----
> From: Markus Eberle [mailto:Markus.Eberle@tngtech.com]
> Sent: Tuesday, May 31, 2005 2:56 AM
> To: Tapestry users
> Subject: Re: Tapestry and OutOfMemoryError
>
>
> > >When the J2EE server is run with the JVM arguments
> > >-Dorg.apache.tapestry.disable-caching=true, does tapestry keep
> > >creating objects and not Garbage collect them? When I have the
> > >argument set, I get OutOfMemoryErrors when developing my code after
> > >working with my web application for about 5 mins. Anyone have
> > >OutOfMemoryErrors when using Tapestry?
> > >
> > >
> > For what it's worth, I've seen some similar behaviour, but at the
> > moment I couldn't report anything useful. Still, I'm not sure it's
> > tapestry at all: could be cayenne, eclipse or hivemind.
> > If you ask me, the most probable possibility is that I'm to blame, of
> > course. :)
>
> We have the same problem, when running with
> "-Dorg.apache.tapestry.disable-caching=true", but as soon as we enable
> the tapestry caching everything is fine and the application works
> "endless".
>
> Cheers,
>     Markus
>
> ---------------------------------------------------------------------
> 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: Tapestry and OutOfMemoryError

Posted by Andreas Andreou <an...@di.uoa.gr>.
I had similar problems in 3.0.1
in development machines where i would reload the context every 5-10 mins
and an OutOfMemory would get thrown every now and then...
Check out
http://issues.apache.org/jira/browse/TAPESTRY-230
it's fixed in 3.0.3

Markus Eberle wrote:

>We are using 3.0.1.
>
>  
>
>>Which version (of Tapestry) are you using?
>>
>>Ryan Phelan wrote:
>>
>>    
>>
>>>Markus,
>>>
>>>	I see, that is very helpful to me to see that someone else has
>>>the error too. Did you guys ever find out what the actual cause is? Like
>>>you, I'm suspecting that it has something to do with tapestry debug mode
>>>(caching.disabled=true), because it works *endless* as you said when set
>>>to "false", and errors out when set to "true". Would be good to know :)
>>>
>>>Thanks much!
>>>
>>>-----Original Message-----
>>>From: Markus Eberle [mailto:Markus.Eberle@tngtech.com]
>>>Sent: Tuesday, May 31, 2005 2:56 AM
>>>To: Tapestry users
>>>Subject: Re: Tapestry and OutOfMemoryError
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>>When the J2EE server is run with the JVM arguments
>>>>>-Dorg.apache.tapestry.disable-caching=true, does tapestry keep
>>>>>creating objects and not Garbage collect them? When I have the
>>>>>argument set, I get OutOfMemoryErrors when developing my code after
>>>>>working with my web application for about 5 mins. Anyone have
>>>>>OutOfMemoryErrors when using Tapestry?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>For what it's worth, I've seen some similar behaviour, but at the
>>>>moment I couldn't report anything useful. Still, I'm not sure it's
>>>>tapestry at all: could be cayenne, eclipse or hivemind.
>>>>If you ask me, the most probable possibility is that I'm to blame, of
>>>>course. :)
>>>>
>>>>
>>>>        
>>>>
>>>We have the same problem, when running with
>>>"-Dorg.apache.tapestry.disable-caching=true", but as soon as we enable
>>>the tapestry caching everything is fine and the application works
>>>"endless".
>>>
>>>Cheers,
>>>   Markus
>>>
>>>---------------------------------------------------------------------
>>>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: Tapestry and OutOfMemoryError

Posted by Markus Eberle <Ma...@tngtech.com>.
We are using 3.0.1.

> Which version (of Tapestry) are you using?
>
> Ryan Phelan wrote:
>
> >Markus,
> >
> >	I see, that is very helpful to me to see that someone else has
> >the error too. Did you guys ever find out what the actual cause is? Like
> >you, I'm suspecting that it has something to do with tapestry debug mode
> >(caching.disabled=true), because it works *endless* as you said when set
> >to "false", and errors out when set to "true". Would be good to know :)
> >
> >Thanks much!
> >
> >-----Original Message-----
> >From: Markus Eberle [mailto:Markus.Eberle@tngtech.com]
> >Sent: Tuesday, May 31, 2005 2:56 AM
> >To: Tapestry users
> >Subject: Re: Tapestry and OutOfMemoryError
> >
> >
> >
> >
> >>>When the J2EE server is run with the JVM arguments
> >>>-Dorg.apache.tapestry.disable-caching=true, does tapestry keep
> >>>creating objects and not Garbage collect them? When I have the
> >>>argument set, I get OutOfMemoryErrors when developing my code after
> >>>working with my web application for about 5 mins. Anyone have
> >>>OutOfMemoryErrors when using Tapestry?
> >>>
> >>>
> >>>
> >>>
> >>For what it's worth, I've seen some similar behaviour, but at the
> >>moment I couldn't report anything useful. Still, I'm not sure it's
> >>tapestry at all: could be cayenne, eclipse or hivemind.
> >>If you ask me, the most probable possibility is that I'm to blame, of
> >>course. :)
> >>
> >>
> >
> >We have the same problem, when running with
> >"-Dorg.apache.tapestry.disable-caching=true", but as soon as we enable
> >the tapestry caching everything is fine and the application works
> >"endless".
> >
> >Cheers,
> >    Markus
> >
> >---------------------------------------------------------------------
> >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: Tapestry and OutOfMemoryError

Posted by Andreas Andreou <an...@di.uoa.gr>.
Which version (of Tapestry) are you using?

Ryan Phelan wrote:

>Markus,
>
>	I see, that is very helpful to me to see that someone else has
>the error too. Did you guys ever find out what the actual cause is? Like
>you, I'm suspecting that it has something to do with tapestry debug mode
>(caching.disabled=true), because it works *endless* as you said when set
>to "false", and errors out when set to "true". Would be good to know :)
>
>Thanks much!
>
>-----Original Message-----
>From: Markus Eberle [mailto:Markus.Eberle@tngtech.com] 
>Sent: Tuesday, May 31, 2005 2:56 AM
>To: Tapestry users
>Subject: Re: Tapestry and OutOfMemoryError
>
>
>  
>
>>>When the J2EE server is run with the JVM arguments 
>>>-Dorg.apache.tapestry.disable-caching=true, does tapestry keep 
>>>creating objects and not Garbage collect them? When I have the 
>>>argument set, I get OutOfMemoryErrors when developing my code after 
>>>working with my web application for about 5 mins. Anyone have 
>>>OutOfMemoryErrors when using Tapestry?
>>>
>>>
>>>      
>>>
>>For what it's worth, I've seen some similar behaviour, but at the 
>>moment I couldn't report anything useful. Still, I'm not sure it's 
>>tapestry at all: could be cayenne, eclipse or hivemind.
>>If you ask me, the most probable possibility is that I'm to blame, of
>>course. :)
>>    
>>
>
>We have the same problem, when running with
>"-Dorg.apache.tapestry.disable-caching=true", but as soon as we enable
>the tapestry caching everything is fine and the application works
>"endless".
>
>Cheers,
>    Markus
>
>---------------------------------------------------------------------
>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: Tapestry and OutOfMemoryError

Posted by Ryan Phelan <ry...@verizon.net>.
Markus,

	I see, that is very helpful to me to see that someone else has
the error too. Did you guys ever find out what the actual cause is? Like
you, I'm suspecting that it has something to do with tapestry debug mode
(caching.disabled=true), because it works *endless* as you said when set
to "false", and errors out when set to "true". Would be good to know :)

Thanks much!

-----Original Message-----
From: Markus Eberle [mailto:Markus.Eberle@tngtech.com] 
Sent: Tuesday, May 31, 2005 2:56 AM
To: Tapestry users
Subject: Re: Tapestry and OutOfMemoryError


> >When the J2EE server is run with the JVM arguments 
> >-Dorg.apache.tapestry.disable-caching=true, does tapestry keep 
> >creating objects and not Garbage collect them? When I have the 
> >argument set, I get OutOfMemoryErrors when developing my code after 
> >working with my web application for about 5 mins. Anyone have 
> >OutOfMemoryErrors when using Tapestry?
> >
> >
> For what it's worth, I've seen some similar behaviour, but at the 
> moment I couldn't report anything useful. Still, I'm not sure it's 
> tapestry at all: could be cayenne, eclipse or hivemind.
> If you ask me, the most probable possibility is that I'm to blame, of
> course. :)

We have the same problem, when running with
"-Dorg.apache.tapestry.disable-caching=true", but as soon as we enable
the tapestry caching everything is fine and the application works
"endless".

Cheers,
    Markus

---------------------------------------------------------------------
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: Tapestry and OutOfMemoryError

Posted by Markus Eberle <Ma...@tngtech.com>.
> >When the J2EE server is run with the JVM arguments
> >-Dorg.apache.tapestry.disable-caching=true, does tapestry keep creating
> >objects and not Garbage collect them? When I have the argument set, I
> >get OutOfMemoryErrors when developing my code after working with my web
> >application for about 5 mins. Anyone have OutOfMemoryErrors when using
> >Tapestry?
> >
> >
> For what it's worth, I've seen some similar behaviour, but at the moment
> I couldn't report anything useful.
> Still, I'm not sure it's tapestry at all: could be cayenne, eclipse or
> hivemind.
> If you ask me, the most probable possibility is that I'm to blame, of
> course. :)

We have the same problem, when running with
"-Dorg.apache.tapestry.disable-caching=true", but as soon as we enable the
tapestry caching everything is fine and the application works "endless".

Cheers,
    Markus

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


Re: Tapestry and OutOfMemoryError

Posted by "t.n.a." <tn...@sharanet.org>.
Ryan Phelan wrote:

>When the J2EE server is run with the JVM arguments
>-Dorg.apache.tapestry.disable-caching=true, does tapestry keep creating
>objects and not Garbage collect them? When I have the argument set, I
>get OutOfMemoryErrors when developing my code after working with my web
>application for about 5 mins. Anyone have OutOfMemoryErrors when using
>Tapestry?
>  
>
For what it's worth, I've seen some similar behaviour, but at the moment 
I couldn't report anything useful.
Still, I'm not sure it's tapestry at all: could be cayenne, eclipse or 
hivemind.
If you ask me, the most probable possibility is that I'm to blame, of 
course. :)

t.n.a.

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


Re: Apache mailing list leading to SPAM

Posted by Andrus Adamchik <an...@objectstyle.org>.
>
> I was appalled to find out that the apache archives don't remove email
> addresses when exposing them over the web. Ever since I joined this
> mailng list, I've started getting tons of junk mail. Does anyone know
> whom to contact to rectify this?
>

I brought this up a year or two ago on jakarta-general with no positive
response (responses were along the lines of "everything works as it
should", and such)... Oh well, back to upgrading my spam filters...

Andrus



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


ThreadLocal example pleeeeease!

Posted by sa...@women-at-work.org.
Could anyone of you post a quick example how to correctly
use ThreadLocal within a Tapestry page and a Tapestry component?

My global object currently is a map of group data and the key is the group
key. Different page getter methods need parameters that is derived from the
group data .....

E.g. administrator is on:

admin.domain.com

moderators on moderators.domain.com

users on www.domain.com

guests on guests.domain.com

a method that is called getMenuOptions should retrieve the menu options.

The menu can contain 4 different kinds of data. So it is all in a global map
and the database is only queried once.

But this leads to having to parse the map all the time 
the method getMenuOptions or any other method that will indirectly call it,
is called.

and I want to sort of shift it into some sort of local variables to be able
to directly access it.

Is that possible using ThreadLocal ? If so, how ?

Thank you!

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


Re: Apache mailing list leading to SPAM

Posted by Andrus Adamchik <an...@objectstyle.org>.
> But again, consider the services that tap into the lists by
> subscribing to it rather than using the archives.  Your e-mail
> address will end up elsewhere regardless of what happens on the
> Apache side of things.

True, but from my objectstyle.org sysadmin experience I only identified a
single subscriber email address that was a likely spam bot in the past 3-4
years, while there is like a dozen of different spam bots scanning the web
site daily.

So empirical evidence suggests that spammers normally don't go into
trouble of manually subscribing their bot... This maybe different for more
high-traffic apache lists... Still I think protecting the archives is a
simple step a sysadmin must implement. This is kind of like not running an
open relay - it doesn't solve the global spam problem, but is still a
sensible thing to do for your user community.

Andrus



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


Re: Apache mailing list leading to SPAM

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 31, 2005, at 10:23 AM, Andrus Adamchik wrote:

>
>
>> Consider that the e-mail lists are public and that there are many
>> services that tap into the archives to allow viewing/searching them.
>> Services could also simply subscribe to the lists and harvest
>> messages that way as well.
>>
>> Hiding your e-mail address to avoid spam is like not publishing your
>> IP address to avoid security vulnerabilities.  Security through
>> obscurity doesn't work (for long).
>>
>>      Erik
>>
>
> I disagree. Filtering archive emails through a simple script along the
> lines of "s/.@.//g" goes a long way in preventing spam. I am doing  
> it on
> all objectstyle.org mailing lists (cayenne, woproject), and it didn't
> cause any inconveneince so far... It is not security through  
> obscurity, it
> is just a simple and practical solution.

But again, consider the services that tap into the lists by  
subscribing to it rather than using the archives.  Your e-mail  
address will end up elsewhere regardless of what happens on the  
Apache side of things.  Right?

     Erik


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


Re: Apache mailing list leading to SPAM

Posted by Andrus Adamchik <an...@objectstyle.org>.
> Consider that the e-mail lists are public and that there are many
> services that tap into the archives to allow viewing/searching them.
> Services could also simply subscribe to the lists and harvest
> messages that way as well.
>
> Hiding your e-mail address to avoid spam is like not publishing your
> IP address to avoid security vulnerabilities.  Security through
> obscurity doesn't work (for long).
>
>      Erik

I disagree. Filtering archive emails through a simple script along the
lines of "s/.@.//g" goes a long way in preventing spam. I am doing it on
all objectstyle.org mailing lists (cayenne, woproject), and it didn't
cause any inconveneince so far... It is not security through obscurity, it
is just a simple and practical solution.

Cheers,
Andrus





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


Re: Apache mailing list leading to SPAM

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 31, 2005, at 10:00 AM, Karthik Abram wrote:

>
> I was appalled to find out that the apache archives don't remove email
> addresses when exposing them over the web. Ever since I joined this  
> mailng
> list, I've started getting tons of junk mail. Does anyone know whom to
> contact to rectify this?

You're welcome to bring this up on the infrastructure@apache.org e- 
mail list, but it is unlikely to change from how it is.

Consider that the e-mail lists are public and that there are many  
services that tap into the archives to allow viewing/searching them.   
Services could also simply subscribe to the lists and harvest  
messages that way as well.

Hiding your e-mail address to avoid spam is like not publishing your  
IP address to avoid security vulnerabilities.  Security through  
obscurity doesn't work (for long).

     Erik


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


Apache mailing list leading to SPAM

Posted by Karthik Abram <ka...@neovera.com>.
I was appalled to find out that the apache archives don't remove email
addresses when exposing them over the web. Ever since I joined this mailng
list, I've started getting tons of junk mail. Does anyone know whom to
contact to rectify this?


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


RE: Tapestry and OutOfMemoryError

Posted by Ryan Phelan <ry...@verizon.net>.
Markus: yes, this is exactly what happens to me as well.

Andreas: I'm using version 3.0.3 (It also happened when I started off
using 3.0.1 and 3.0.2)

Marcus Brito: What is YJP? Never heard of that profiler b4.... Is it
free? :)

Michael Musson: Yes, you and I are in the same boat. Tracking this down
is huge for me too.

Bryan Lewis: I'll try your JVM arguments and see what happens! I'll be
and sure to post if this cleans up my problem. 

Seems like tapestry is doing something funny under the covers, since so
many people seem to be having the same problem.... But of course,
Tapestry is "sitting on top" of a lot of other code (JBoss, hibernate,
etc.... In my case), but it's just too hard to ignore since once
disable-caching=false there is no problem, but when, true, the OOME
occurs.....

Thanks for all of your help!

-----Original Message-----
From: Bryan Lewis [mailto:bryan@maine.rr.com] 
Sent: Tuesday, May 31, 2005 8:31 AM
To: Tapestry users
Subject: Re: Tapestry and OutOfMemoryError


We used to get the OOME after every dozen or so redeploys in
development. We're using JBoss+Tomcat and it does lose memory after
every hot-deploy.

* I looked at the heap with JProfiler.  It has a free 10-day-evaluation
version, so if you work quickly it's free. I was happy enough with the
results that I bought a copy.  What a concept.

* I found some sloppy references of my own doing. My custom Engine was
hanging onto a reference to the Visits, and the Visit was referring to
my model-layer object graph. Doh. Beware of static non-final instance
variables in the base classes.

* There were two postings on this list on January 31st about OOME.
MindBridge recommended some extra JVM switches which seemed to help
avoid the error after frequent redeploys in development.  My complete
set of JVM options is this:

-server -ea -Dorg.apache.tapestry.disable-caching=true
-Xms256m -Xmx256m
-XX:MaxNewSize=256m -XX:MaxPermSize=256m


I haven't seen an OOME in months.




----- Original Message ----- 
From: "Ryan Phelan" <ry...@verizon.net>
To: <ta...@jakarta.apache.org>
Sent: Monday, May 30, 2005 11:01 PM
Subject: Tapestry and OutOfMemoryError


> When the J2EE server is run with the JVM arguments 
> -Dorg.apache.tapestry.disable-caching=true, does tapestry keep 
> creating objects and not Garbage collect them? When I have the 
> argument set, I get OutOfMemoryErrors when developing my code after 
> working with my web application for about 5 mins. Anyone have 
> OutOfMemoryErrors when using Tapestry? Thank you!
>
> Ryan
>


---------------------------------------------------------------------
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: Tapestry and OutOfMemoryError

Posted by Bryan Lewis <br...@maine.rr.com>.
We used to get the OOME after every dozen or so redeploys in development.
We're using JBoss+Tomcat and it does lose memory after every hot-deploy.

* I looked at the heap with JProfiler.  It has a free 10-day-evaluation
version, so if you work quickly it's free. I was happy enough with the
results that I bought a copy.  What a concept.

* I found some sloppy references of my own doing. My custom Engine was
hanging onto a reference to the Visits, and the Visit was referring to my
model-layer object graph. Doh. Beware of static non-final instance variables
in the base classes.

* There were two postings on this list on January 31st about OOME.
MindBridge recommended some extra JVM switches which seemed to help avoid
the error after frequent redeploys in development.  My complete set of JVM
options is this:

-server -ea -Dorg.apache.tapestry.disable-caching=true
-Xms256m -Xmx256m
-XX:MaxNewSize=256m -XX:MaxPermSize=256m


I haven't seen an OOME in months.




----- Original Message ----- 
From: "Ryan Phelan" <ry...@verizon.net>
To: <ta...@jakarta.apache.org>
Sent: Monday, May 30, 2005 11:01 PM
Subject: Tapestry and OutOfMemoryError


> When the J2EE server is run with the JVM arguments
> -Dorg.apache.tapestry.disable-caching=true, does tapestry keep creating
> objects and not Garbage collect them? When I have the argument set, I
> get OutOfMemoryErrors when developing my code after working with my web
> application for about 5 mins. Anyone have OutOfMemoryErrors when using
> Tapestry?
> Thank you!
>
> Ryan
>


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


Re: Tapestry and OutOfMemoryError

Posted by Pablo Ruggia <pr...@gmail.com>.
It's not a common problem, definitivily.

On 5/31/05, Ryan Phelan <ry...@verizon.net> wrote:
> Thanks for the quick Response!, Yes I'm well aware of the gc capabilites
> of Java. (It was a nice refresher though :)... Anyway, while hunting for
> such *leaks*, I need to target (or eliminate) Tapestry as the cause of
> my OutOfMemoryErrors. Seems to work fine when disable-caching is set to
> false, but when it is true, then I get OutOfMemoryErrors. Anyone else
> run into this problem? Is it a common and known thing in the tapestry
> world? Does Tapestry expect you to make a few changes, shutdown the
> server, and then go at it again, when writing/debugging a web
> application based on tapestry (when disable-caching = true, that is) ?
> 
> Thanks again! :)
> 
> -----Original Message-----
> From: Patrick Casey [mailto:patcasey@adelphia.net]
> Sent: Monday, May 30, 2005 10:09 PM
> To: 'Tapestry users'
> Subject: RE: Tapestry and OutOfMemoryError
> 
> 
> 
>         Tapestry doesn't have control of when things get garbage
> collected; that's up the the JVM (unless you manually call system.gc()
> and even then you're only *suggesting* that the JVM do a round of
> garbage collection). If you're running out of memory, I'd seriously look
> at your own object creation patterns and/or caching code.
> 
>         Remember that things won't be collected unless they're
> unreachable so if there exists a legal reference chain to an object,
> nomatter how tenuous, it's not going anywhere. You *can* leak memory in
> java if you A) overcache or B) leave lots of obsolete reference chains
> intact.
> 
>         -- pat
> 
> > -----Original Message-----
> > From: Ryan Phelan [mailto:ryan-phelan@verizon.net]
> > Sent: Monday, May 30, 2005 8:02 PM
> > To: tapestry-user@jakarta.apache.org
> > Subject: Tapestry and OutOfMemoryError
> >
> > When the J2EE server is run with the JVM arguments
> > -Dorg.apache.tapestry.disable-caching=true, does tapestry keep
> > creating objects and not Garbage collect them? When I have the
> > argument set, I get OutOfMemoryErrors when developing my code after
> > working with my web application for about 5 mins. Anyone have
> > OutOfMemoryErrors when using Tapestry? Thank you!
> >
> > Ryan
> 
> 
> 
> ---------------------------------------------------------------------
> 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: Tapestry and OutOfMemoryError

Posted by Ryan Phelan <ry...@verizon.net>.
I have done such a thing, It is as you suggested now.
(JAVA_OPTS="-server -Xms128m -Xmx512m). This only prolongs the eventual
OutOfMemoryError. <sign>.... Oh well, I guess its profiler time. Anyone
could suggest a good memory heap analyzer/profiler? I've heard Borlands
OptimizeIt was great but, I don't have the $1000's to get it :). How
about HAT, etc?

-----Original Message-----
From: Konstantin Iignatyev [mailto:kgignatyev@yahoo.com] 
Sent: Monday, May 30, 2005 10:54 PM
To: Tapestry users
Subject: Re: Tapestry and OutOfMemoryError


You may try increasing memory for JBoss JVM in run.conf file
JAVA_OPTS="-server -Xms128m -Xmx512m" or even higher, depending on peak
needs of your application

Ryan Phelan wrote:

>Hey Guys,
>
>
>Konstantin: Yes, I'm using Tomcat too. (Well JBoss 4.01sp1, which has 
>as its servlet container, Tomcat.) But this happens even when a fresh 
>start of the server is loaded AND disable-caching=true.
>  
>
>  
>


-- 
Thanks,

Konstantin Ignatyev

http://www.kgionline.com





PS: If this is a typical day on planet earth, humans will add fifteen
million tons of carbon to the atmosphere, destroy 115 square miles of
tropical rainforest, create seventy-two miles of desert, eliminate
between forty to one hundred species, erode seventy-one million tons of
topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their
population by 263.000

Bowers, C.A.  The Culture of Denial:  
Why the Environmental Movement Needs a Strategy for Reforming
Universities and Public Schools.  
New York:  State University of New York Press, 1997: (4) (5) (p.206)


---------------------------------------------------------------------
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: Tapestry and OutOfMemoryError

Posted by Konstantin Iignatyev <kg...@yahoo.com>.
You may try increasing memory for JBoss JVM in run.conf file
JAVA_OPTS="-server -Xms128m -Xmx512m"
or even higher, depending on peak needs of your application

Ryan Phelan wrote:

>Hey Guys,
>
>
>Konstantin: Yes, I'm using Tomcat too. (Well JBoss 4.01sp1, which has as
>its servlet container, Tomcat.) But this happens even when a fresh start
>of the server is loaded AND disable-caching=true.
>  
>
>  
>


-- 
Thanks,

Konstantin Ignatyev

http://www.kgionline.com





PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their population by 263.000

Bowers, C.A.  The Culture of Denial:  
Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools.  
New York:  State University of New York Press, 1997: (4) (5) (p.206)


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


RE: Tapestry and OutOfMemoryError

Posted by Ryan Phelan <ry...@verizon.net>.
Hey Guys,

	Thanks for the info.

Pablo: Thanks, I'll stop looking to tapestry (the code itself) as the
cause :)

Patrick: I always take care to either null out object trees myself (via
initialize()) or simply setting up property specifications (which null
out values on return to the pool, as we all know) I'll take your advice
and begin looking more closely for anything I missed.

Konstantin: Yes, I'm using Tomcat too. (Well JBoss 4.01sp1, which has as
its servlet container, Tomcat.) But this happens even when a fresh start
of the server is loaded AND disable-caching=true.

Thanks much for your input thus far!

-----Original Message-----
From: Konstantin Iignatyev [mailto:kgignatyev@yahoo.com] 
Sent: Monday, May 30, 2005 10:33 PM
To: Tapestry users
Subject: Re: Tapestry and OutOfMemoryError


In my experience Tomcat eats memory when I do hot deployments regardless

of framework. So after 10-20 of them I usually need to start/stop
Tomcat.

Ryan Phelan wrote:

>Thanks for the quick Response!, Yes I'm well aware of the gc 
>capabilites of Java. (It was a nice refresher though :)... Anyway, 
>while hunting for such *leaks*, I need to target (or eliminate) 
>Tapestry as the cause of my OutOfMemoryErrors. Seems to work fine when 
>disable-caching is set to false, but when it is true, then I get 
>OutOfMemoryErrors. Anyone else run into this problem? Is it a common 
>and known thing in the tapestry world? Does Tapestry expect you to make

>a few changes, shutdown the server, and then go at it again, when 
>writing/debugging a web application based on tapestry (when 
>disable-caching = true, that is) ?
>
>Thanks again! :)
>
>-
>


-- 
Thanks,

Konstantin Ignatyev

http://www.kgionline.com





PS: If this is a typical day on planet earth, humans will add fifteen
million tons of carbon to the atmosphere, destroy 115 square miles of
tropical rainforest, create seventy-two miles of desert, eliminate
between forty to one hundred species, erode seventy-one million tons of
topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their
population by 263.000

Bowers, C.A.  The Culture of Denial:  
Why the Environmental Movement Needs a Strategy for Reforming
Universities and Public Schools.  
New York:  State University of New York Press, 1997: (4) (5) (p.206)


---------------------------------------------------------------------
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: Tapestry and OutOfMemoryError

Posted by Konstantin Iignatyev <kg...@yahoo.com>.
In my experience Tomcat eats memory when I do hot deployments regardless 
of framework. So after 10-20 of them I usually need to start/stop Tomcat.

Ryan Phelan wrote:

>Thanks for the quick Response!, Yes I'm well aware of the gc capabilites
>of Java. (It was a nice refresher though :)... Anyway, while hunting for
>such *leaks*, I need to target (or eliminate) Tapestry as the cause of
>my OutOfMemoryErrors. Seems to work fine when disable-caching is set to
>false, but when it is true, then I get OutOfMemoryErrors. Anyone else
>run into this problem? Is it a common and known thing in the tapestry
>world? Does Tapestry expect you to make a few changes, shutdown the
>server, and then go at it again, when writing/debugging a web
>application based on tapestry (when disable-caching = true, that is) ?
>
>Thanks again! :)
>
>-
>


-- 
Thanks,

Konstantin Ignatyev

http://www.kgionline.com





PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their population by 263.000

Bowers, C.A.  The Culture of Denial:  
Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools.  
New York:  State University of New York Press, 1997: (4) (5) (p.206)


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


RE: Tapestry and OutOfMemoryError

Posted by Patrick Casey <pa...@adelphia.net>.
	Are you leaving expensive reference chains attached to the tapestry
page objects? Remember that with caching on the pages go into a pool so if
you allocate a massive object tree during page render and don't null it out
during initialize, it'll sit there in memory forever (or until the page
comes back out of pool and the reference gets set to something else).

	--- Pat

> -----Original Message-----
> From: Ryan Phelan [mailto:ryan-phelan@verizon.net]
> Sent: Monday, May 30, 2005 8:15 PM
> To: 'Tapestry users'
> Subject: RE: Tapestry and OutOfMemoryError
> 
> Thanks for the quick Response!, Yes I'm well aware of the gc capabilites
> of Java. (It was a nice refresher though :)... Anyway, while hunting for
> such *leaks*, I need to target (or eliminate) Tapestry as the cause of
> my OutOfMemoryErrors. Seems to work fine when disable-caching is set to
> false, but when it is true, then I get OutOfMemoryErrors. Anyone else
> run into this problem? Is it a common and known thing in the tapestry
> world? Does Tapestry expect you to make a few changes, shutdown the
> server, and then go at it again, when writing/debugging a web
> application based on tapestry (when disable-caching = true, that is) ?
> 
> Thanks again! :)
> 
> -----Original Message-----
> From: Patrick Casey [mailto:patcasey@adelphia.net]
> Sent: Monday, May 30, 2005 10:09 PM
> To: 'Tapestry users'
> Subject: RE: Tapestry and OutOfMemoryError
> 
> 
> 
> 	Tapestry doesn't have control of when things get garbage
> collected; that's up the the JVM (unless you manually call system.gc()
> and even then you're only *suggesting* that the JVM do a round of
> garbage collection). If you're running out of memory, I'd seriously look
> at your own object creation patterns and/or caching code.
> 
> 	Remember that things won't be collected unless they're
> unreachable so if there exists a legal reference chain to an object,
> nomatter how tenuous, it's not going anywhere. You *can* leak memory in
> java if you A) overcache or B) leave lots of obsolete reference chains
> intact.
> 
> 	-- pat
> 
> > -----Original Message-----
> > From: Ryan Phelan [mailto:ryan-phelan@verizon.net]
> > Sent: Monday, May 30, 2005 8:02 PM
> > To: tapestry-user@jakarta.apache.org
> > Subject: Tapestry and OutOfMemoryError
> >
> > When the J2EE server is run with the JVM arguments
> > -Dorg.apache.tapestry.disable-caching=true, does tapestry keep
> > creating objects and not Garbage collect them? When I have the
> > argument set, I get OutOfMemoryErrors when developing my code after
> > working with my web application for about 5 mins. Anyone have
> > OutOfMemoryErrors when using Tapestry? Thank you!
> >
> > Ryan
> 
> 
> 
> ---------------------------------------------------------------------
> 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: Tapestry and OutOfMemoryError

Posted by Ryan Phelan <ry...@verizon.net>.
Thanks for the quick Response!, Yes I'm well aware of the gc capabilites
of Java. (It was a nice refresher though :)... Anyway, while hunting for
such *leaks*, I need to target (or eliminate) Tapestry as the cause of
my OutOfMemoryErrors. Seems to work fine when disable-caching is set to
false, but when it is true, then I get OutOfMemoryErrors. Anyone else
run into this problem? Is it a common and known thing in the tapestry
world? Does Tapestry expect you to make a few changes, shutdown the
server, and then go at it again, when writing/debugging a web
application based on tapestry (when disable-caching = true, that is) ?

Thanks again! :)

-----Original Message-----
From: Patrick Casey [mailto:patcasey@adelphia.net] 
Sent: Monday, May 30, 2005 10:09 PM
To: 'Tapestry users'
Subject: RE: Tapestry and OutOfMemoryError



	Tapestry doesn't have control of when things get garbage
collected; that's up the the JVM (unless you manually call system.gc()
and even then you're only *suggesting* that the JVM do a round of
garbage collection). If you're running out of memory, I'd seriously look
at your own object creation patterns and/or caching code. 

	Remember that things won't be collected unless they're
unreachable so if there exists a legal reference chain to an object,
nomatter how tenuous, it's not going anywhere. You *can* leak memory in
java if you A) overcache or B) leave lots of obsolete reference chains
intact.

	-- pat

> -----Original Message-----
> From: Ryan Phelan [mailto:ryan-phelan@verizon.net]
> Sent: Monday, May 30, 2005 8:02 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Tapestry and OutOfMemoryError
> 
> When the J2EE server is run with the JVM arguments 
> -Dorg.apache.tapestry.disable-caching=true, does tapestry keep 
> creating objects and not Garbage collect them? When I have the 
> argument set, I get OutOfMemoryErrors when developing my code after 
> working with my web application for about 5 mins. Anyone have 
> OutOfMemoryErrors when using Tapestry? Thank you!
> 
> Ryan



---------------------------------------------------------------------
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: Tapestry and OutOfMemoryError

Posted by Patrick Casey <pa...@adelphia.net>.
	Tapestry doesn't have control of when things get garbage collected;
that's up the the JVM (unless you manually call system.gc() and even then
you're only *suggesting* that the JVM do a round of garbage collection). If
you're running out of memory, I'd seriously look at your own object creation
patterns and/or caching code. 

	Remember that things won't be collected unless they're unreachable
so if there exists a legal reference chain to an object, nomatter how
tenuous, it's not going anywhere. You *can* leak memory in java if you A)
overcache or B) leave lots of obsolete reference chains intact.

	-- pat

> -----Original Message-----
> From: Ryan Phelan [mailto:ryan-phelan@verizon.net]
> Sent: Monday, May 30, 2005 8:02 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Tapestry and OutOfMemoryError
> 
> When the J2EE server is run with the JVM arguments
> -Dorg.apache.tapestry.disable-caching=true, does tapestry keep creating
> objects and not Garbage collect them? When I have the argument set, I
> get OutOfMemoryErrors when developing my code after working with my web
> application for about 5 mins. Anyone have OutOfMemoryErrors when using
> Tapestry?
> Thank you!
> 
> Ryan



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