Re: OutOfMemoryError after serving N pages

2007-06-29 Thread Hans Drexler
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

Re: OutOfMemoryError after serving N pages

2007-06-28 Thread Thomas Wiz



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]



Re: OutOfMemoryError after serving N pages

2007-06-28 Thread Evan Rawson - Work
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]



Re: OutOfMemoryError after serving N pages

2007-06-28 Thread Norman Franke
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]



Re: OutOfMemoryError after serving N pages

2007-06-28 Thread Evan Rawson - Work
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]



Re: OutOfMemoryError after serving N pages

2007-06-28 Thread Jesse Kuhnert

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


Re: OutOfMemoryError after serving N pages

2007-02-26 Thread Howard Lewis Ship

May the sone property abstract.  You are clearing it inside
finishLoad() which means, even with caching enabled, the song (and the
presumably Hibernate session that it was obtained from) is retained
needlessly between requests.

Most likely culprit is caching disabled, which leaks some memory
related to the series of Classes / ClassLoaders it builds.

On 2/22/07, Arjan Verstoep [EMAIL PROTECTED] wrote:

Hi,

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

public abstract class CurrentlyPlaying extends BasePage {
public abstract SessionUserState getSessionUserState();
public abstract Dao getDao();

private Song _song = null;

public Song getCurrentSong() {
if (_song==null) {
_song =
getDao().getSongById(getSessionUserState().getDJ().getCurrentSongId());
}
return _song;
}

public void finishLoad() {
super.finishLoad();
_song = null;
}
}

?xml version=1.0 encoding=UTF-8?
!DOCTYPE page-specification PUBLIC
  -//Apache Software Foundation//Tapestry Specification 4.0//EN
  http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
page-specification class=org.musicontroller.gui.dynamic.CurrentlyPlaying
inject property=sessionUserState type=state
object=sessionUserState/
inject property=dao object=spring:dao/

component id=ifPlaying type=If
binding name=condition value=getCurrentSong()!=null/
/component

component id=songName type=Insert
binding name=value value=ognl:currentSong.name/
/component

component id=band type=components/BandLink
binding name=band value=ognl:currentSong.getBand()/
!-- Why doesn't currentSong.band work?? --
/component
/page-specification

body jwcid=@Body
span jwcid=$content$
span jwcid=ifPlaying
span jwcid=band/nbsp;-nbsp;span jwcid=songName/
/span
/span
/body

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





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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



RE: OutOfMemoryError after serving N pages

2007-02-22 Thread Thomas.Vaughan
We had the same thing, and in our case it was related to a small PermGen
Space setting in our Tomcat container.

My understanding of the Sun JVM is that it partitions up its allocated
memory into heap, perm gen, etc. chunks and that the Perm Gen space is
where all meta data about classes gets stored.  In modern JEE
programming with all the CGLIB and just-in-time abstract class overrides
 instantiation, the Perm Gen space tends to blow up quicker.

Anyway, try throwing a -XX:MaxPermSize=256m on your JVM startup and see
if that helps.

Note: if you're actually running out of PermGen space, you'll see a
reference to that in your OOME.  If you are just getting plain old
OOMEs, it sounds like something more sinister.

HTH,
Tom

-Original Message-
From: Arjan Verstoep [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 22, 2007 5:55 AM
To: Tapestry users
Subject: OutOfMemoryError after serving N pages

Hi,

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

public abstract class CurrentlyPlaying extends BasePage {
public abstract SessionUserState getSessionUserState();
public abstract Dao getDao();
   
private Song _song = null;
   
public Song getCurrentSong() {
if (_song==null) {
_song = 
getDao().getSongById(getSessionUserState().getDJ().getCurrentSongId());
}
return _song;
}
   
public void finishLoad() {
super.finishLoad();
_song = null;
}
}

?xml version=1.0 encoding=UTF-8?
!DOCTYPE page-specification PUBLIC
  -//Apache Software Foundation//Tapestry Specification 4.0//EN
  http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
page-specification
class=org.musicontroller.gui.dynamic.CurrentlyPlaying
inject property=sessionUserState type=state 
object=sessionUserState/
inject property=dao object=spring:dao/
   
component id=ifPlaying type=If
binding name=condition value=getCurrentSong()!=null/
/component
   
component id=songName type=Insert
binding name=value value=ognl:currentSong.name/
/component
   
component id=band type=components/BandLink
binding name=band value=ognl:currentSong.getBand()/
!-- Why doesn't currentSong.band work?? --
/component
/page-specification

body jwcid=@Body
span jwcid=$content$
span jwcid=ifPlaying
span jwcid=band/nbsp;-nbsp;span jwcid=songName/
/span
/span
/body

-
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]



Re: OutOfMemoryError after serving N pages

2007-02-22 Thread Arjan Verstoep

[EMAIL PROTECTED] wrote:

We had the same thing, and in our case it was related to a small PermGen
Space setting in our Tomcat container.

My understanding of the Sun JVM is that it partitions up its allocated
memory into heap, perm gen, etc. chunks and that the Perm Gen space is
where all meta data about classes gets stored.  In modern JEE
programming with all the CGLIB and just-in-time abstract class overrides
 instantiation, the Perm Gen space tends to blow up quicker.

Anyway, try throwing a -XX:MaxPermSize=256m on your JVM startup and see
if that helps.

Note: if you're actually running out of PermGen space, you'll see a
reference to that in your OOME.  If you are just getting plain old
OOMEs, it sounds like something more sinister.

HTH,
Tom

  
My JVM is complaining about heap space, so I fear that it is something 
sinister...


  10:36:23,289 ERROR [MusiController4]:253 - Servlet.service() for 
servlet MusiController4 threw exception

  java.lang.OutOfMemoryError: Java heap space


~Arjan Verstoep

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



RE: OutOfMemoryError after serving N pages

2007-02-22 Thread Thomas.Vaughan
Yeah, that is more sinister.

Try dropping a lambdaprobe.war in your container and watching what
happens to your app as you serve up N pages.

It isn't as detailed as JProbe or anything like that, but you'll be up
and running in 5 minutes and it may give you a better overview of your
runtime environment and any resource constraints you may unknowingly
have.

http://www.lambdaprobe.org/d/index.htm


Tom

-Original Message-
From: Arjan Verstoep [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 22, 2007 8:15 AM
To: Tapestry users
Subject: Re: OutOfMemoryError after serving N pages

[EMAIL PROTECTED] wrote:
 We had the same thing, and in our case it was related to a small
PermGen
 Space setting in our Tomcat container.

 My understanding of the Sun JVM is that it partitions up its allocated
 memory into heap, perm gen, etc. chunks and that the Perm Gen space is
 where all meta data about classes gets stored.  In modern JEE
 programming with all the CGLIB and just-in-time abstract class
overrides
  instantiation, the Perm Gen space tends to blow up quicker.

 Anyway, try throwing a -XX:MaxPermSize=256m on your JVM startup and
see
 if that helps.

 Note: if you're actually running out of PermGen space, you'll see a
 reference to that in your OOME.  If you are just getting plain old
 OOMEs, it sounds like something more sinister.

 HTH,
 Tom

   
My JVM is complaining about heap space, so I fear that it is something 
sinister...

   10:36:23,289 ERROR [MusiController4]:253 - Servlet.service() for 
servlet MusiController4 threw exception
   java.lang.OutOfMemoryError: Java heap space


~Arjan Verstoep

-
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]



RE: OutOfMemoryError after serving N pages

2007-02-22 Thread Joe Trewin
If you're using Tomcat and have access to the startup scripts, I'd
suggest turning on JMX so that you can have a look inside the memory
heaps using jconsole.

To do this add a line to tomcat/bin/startup.sh just before the exec at
the end:

export CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9098
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

(Note that this assumes an internal dev box, as there's no ssl or
authentication turned on.)

You can then connect to it with jconsole (in your java install's bin
directory).

The next step would be some more automated profiling, but just visually
looking at the state of the heaps during a load test can be quite
helpful.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: 22 February 2007 13:22
 To: users@tapestry.apache.org
 Subject: RE: OutOfMemoryError after serving N pages
 
 Yeah, that is more sinister.
 
 Try dropping a lambdaprobe.war in your container and watching 
 what happens to your app as you serve up N pages.
 
 It isn't as detailed as JProbe or anything like that, but 
 you'll be up and running in 5 minutes and it may give you a 
 better overview of your runtime environment and any resource 
 constraints you may unknowingly have.
 
 http://www.lambdaprobe.org/d/index.htm
 
 
 Tom
 
 -Original Message-
 From: Arjan Verstoep [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 22, 2007 8:15 AM
 To: Tapestry users
 Subject: Re: OutOfMemoryError after serving N pages
 
 [EMAIL PROTECTED] wrote:
  We had the same thing, and in our case it was related to a small
 PermGen
  Space setting in our Tomcat container.
 
  My understanding of the Sun JVM is that it partitions up 
 its allocated 
  memory into heap, perm gen, etc. chunks and that the Perm 
 Gen space is 
  where all meta data about classes gets stored.  In modern JEE 
  programming with all the CGLIB and just-in-time abstract class
 overrides
   instantiation, the Perm Gen space tends to blow up quicker.
 
  Anyway, try throwing a -XX:MaxPermSize=256m on your JVM startup and
 see
  if that helps.
 
  Note: if you're actually running out of PermGen space, you'll see a 
  reference to that in your OOME.  If you are just getting plain old 
  OOMEs, it sounds like something more sinister.
 
  HTH,
  Tom
 

 My JVM is complaining about heap space, so I fear that it is 
 something sinister...
 
10:36:23,289 ERROR [MusiController4]:253 - 
 Servlet.service() for servlet MusiController4 threw exception
java.lang.OutOfMemoryError: Java heap space
 
 
 ~Arjan Verstoep
 
 -
 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]



Re: OutOfMemoryError after serving N pages

2007-02-22 Thread James Carman

Are you disabling page/component class caching?  Of course, I think
that causes the permgen stuff as mentioned before, but it may be part
of your problem.

On 2/22/07, Joe Trewin [EMAIL PROTECTED] wrote:

If you're using Tomcat and have access to the startup scripts, I'd
suggest turning on JMX so that you can have a look inside the memory
heaps using jconsole.

To do this add a line to tomcat/bin/startup.sh just before the exec at
the end:

export CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9098
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

(Note that this assumes an internal dev box, as there's no ssl or
authentication turned on.)

You can then connect to it with jconsole (in your java install's bin
directory).

The next step would be some more automated profiling, but just visually
looking at the state of the heaps during a load test can be quite
helpful.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 22 February 2007 13:22
 To: users@tapestry.apache.org
 Subject: RE: OutOfMemoryError after serving N pages

 Yeah, that is more sinister.

 Try dropping a lambdaprobe.war in your container and watching
 what happens to your app as you serve up N pages.

 It isn't as detailed as JProbe or anything like that, but
 you'll be up and running in 5 minutes and it may give you a
 better overview of your runtime environment and any resource
 constraints you may unknowingly have.

 http://www.lambdaprobe.org/d/index.htm


 Tom

 -Original Message-
 From: Arjan Verstoep [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 22, 2007 8:15 AM
 To: Tapestry users
 Subject: Re: OutOfMemoryError after serving N pages

 [EMAIL PROTECTED] wrote:
  We had the same thing, and in our case it was related to a small
 PermGen
  Space setting in our Tomcat container.
 
  My understanding of the Sun JVM is that it partitions up
 its allocated
  memory into heap, perm gen, etc. chunks and that the Perm
 Gen space is
  where all meta data about classes gets stored.  In modern JEE
  programming with all the CGLIB and just-in-time abstract class
 overrides
   instantiation, the Perm Gen space tends to blow up quicker.
 
  Anyway, try throwing a -XX:MaxPermSize=256m on your JVM startup and
 see
  if that helps.
 
  Note: if you're actually running out of PermGen space, you'll see a
  reference to that in your OOME.  If you are just getting plain old
  OOMEs, it sounds like something more sinister.
 
  HTH,
  Tom
 
 
 My JVM is complaining about heap space, so I fear that it is
 something sinister...

10:36:23,289 ERROR [MusiController4]:253 -
 Servlet.service() for servlet MusiController4 threw exception
java.lang.OutOfMemoryError: Java heap space


 ~Arjan Verstoep

 -
 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]