Hello all,

Arjan Verstoep and me co-posted the original message. We experienced our
web-application to consume all available memory slowly but steadily until no
memory was left. This was in a production environment, with caching enabled.
Since then, we were able to locate and eliminate one source of this problem,
which we will describe below. Since then, the memory consumption still rises
slowly during production deployment, but not nearly as much as it used to. We
are not yet completely satisfied, because the memory consumption still leads
to OutOfMemoryExceptions eventually. We do not think the problem is with
Tapestry. Rather, there might be a few (common) coding mistakes that lead to
this kind of problem. We must continue our search for any remaining sources of
the problem. 
We hope this information might be helpfull to others.

The problem (partially solved):

In our Engine class, we used to set the Locale for our application. This
contained erroneous code:

public final void setLocale(Locale locale) {
____if (getLocale() == null ) {
________super.setlocale(new Locale("nl","NL"));
____} else {
________super.setLocale(locale);
____}
}

This code effectively prevented Tapestry to cache pages, because every page
was different (each page received a freshly made Locale object).

We replaced the code above with:

private static final Locale NL = new Locale("nl","NL");
public final void setLocale(Locale locale) {
____if (getLocale() == null ) {
________super.setlocale(NL);
____} else {
________super.setLocale(locale);
____}

In this code each page receives the same Locale object and caching now works
as it should.




On Thu, 28 Jun 2007 22:48:21 -0400, Jesse Kuhnert wrote
> Doesn't happen in dev or production mode with Tapestry 4.1.2.   At 
> least not even remotely near what it used to.  It's possible someone 
> may hit it at one point I suppose.
> 
> On 6/28/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote:
> >
> > that is correct. we disable caching on our dev machines, but enable it on
> > our live servers and testing servers. This allows for less local resources
> > to be used and faster redeployments, usually only happens after say 20
> > to30
> > redeployments on a 2gig box. using about 60% of system resources. Ive seen
> > tomcat get up to well over 400 megs. our live servers have never gotten an
> > outta memory with caching on in the last two years, which makes me happy.
> >
> > evan
> > ----- Original Message -----
> > From: "Norman Franke" <[EMAIL PROTECTED]>
> > To: "Tapestry users" <users@tapestry.apache.org>
> > Sent: Thursday, June 28, 2007 12:25 PM
> > Subject: Re: OutOfMemoryError after serving N pages
> >
> >
> > >I get this if I disable caching after a while. However, I have not  seen
> > it
> > >with caching enabled.
> > >
> > > -Norman
> > >
> > > On Jun 28, 2007, at 11:47 AM, Evan Rawson - Work wrote:
> > >
> > >> what application host are you using. cuz i know in tomcat, when you
> > >> redeploy X amount of times you will get out of memory error. i
> > dont  know
> > >> if this is some how related. but the only way to fix it is to  shut
> > down
> > >> and start tomcat back up.
> > >>
> > >> evan
> > >> ----- Original Message ----- From: "Thomas Wiz" <[EMAIL PROTECTED]>
> > >> To: <users@tapestry.apache.org>
> > >> Sent: Thursday, June 28, 2007 3:40 AM
> > >> Subject: Re: OutOfMemoryError after serving N pages
> > >>
> > >>
> > >>>
> > >>>
> > >>>
> > >>> Arjan Verstoep wrote:
> > >>>>
> > >>>> I'm building an application with the Tapestry 4.0.2 framework, which
> > >>>> manages my music-collection. I'm getting OutOfMemoryErrors
> > since  I've
> > >>>> created a small ajax-ish component that refreshes every 10  seconds
> > to
> > >>>> show the song that is currently playing. A piece of javascript  gets
> > >>>> the
> > >>>> Tapestry-page with the currently-playing song on it, and puts the
> > >>>> generated html into a <div>. After 24 hours or so making these
> > >>>> page-requests, an out of memory error occurs.
> > >>>>
> > >>>> I have the feeling that this new auto-refreshing component of  mine
> > >>>> only
> > >>>> quickens the OutOfMemoryError, since I did get these errors  before,
> > >>>> but
> > >>>> only after much longer uptimes.
> > >>>>
> > >>>> What am I doing wrong here? Is it the Spring OpenSessionInView-
> > filter
> > >>>> that I use that is wasting memory, am I not cleaning-up everything
> > >>>> myself? Should I use Tapestry 4.1.1? Can anybody help? The code  of
> > the
> > >>>> page follows:
> > >>>> (You can also have a look at
> > >>>> http://musicontroller.cvs.sourceforge.net/musicontroller/ for more
> > >>>> sourcecode)
> > >>>>
> > >>>> Thanks,
> > >>>> ~Arjan Verstoep
> > >>>>
> > >>>>
> > >>> Hi Arjan,
> > >>> I'm having the same problem you had: heap space OOME after serving  N
> > >>> pages.
> > >>> Did you find any solutions?
> > >>> Thanks.
> > >>> --
> > >>> View this message in context: http://www.nabble.com/
> > >>> OutOfMemoryError-after-serving-N-pages-tf3272095.html#a11338497
> > >>> Sent from the Tapestry - User mailing list archive at Nabble.com.
> > >>>
> > >>>
> > >>> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >>> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -- 
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
> 
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


----
Hans Drexler
GeoTax en WOZ-Support b.v.
e: [EMAIL PROTECTED]


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

Reply via email to