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