tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <rosenberg.l...@googlemail.com>
Subject Re: Recovery from OutOfMemoryError?
Date Tue, 31 Jul 2007 21:47:12 GMT
How about using SoftReference to store _large_ or some session data?
It must add additional overhead due to data re-retrieval needed in
case it has been collected, but at least its guaranteed that you will
never get an oome, and chances are good, that you will loose inactive
sessions earlier.

regards
leon

p.s. of course only a workaround but may help if data size is unpredictable.

On 7/31/07, Craig Berry <Craig.Berry@portblue.com> wrote:
> The trouble is that our memory demand per user session is unpredictable.
> Some user sessions do things that barely touch the heap; other sessions
> can make huge demands.  It depends on what the user chooses to do during
> the session.  So throttling user count down to make it utterly safe
> would be impractical.  Instead, statistically, it's unlikely that more
> than one or two memory-hungry sessions will be active at any given time.
> When we get more than that at once, we risk an OOME.
>
> -----Original Message-----
> From: Andrew Miehs [mailto:andrew@2sheds.de]
> Sent: Tuesday, July 31, 2007 10:01 AM
> To: Tomcat Users List
> Subject: Re: Recovery from OutOfMemoryError?
>
> On 31/07/2007, at 6:52 PM, Craig Berry wrote:
>
> > Fixing the bug would be cool, but the "bug" is actually just too many
> > users contending for the same heap space, so that's going to be tough.
> > I'd thought of the log watcher, but that seems a rather blunt
> > instrument; I was thinking there might be some kind of Tomcat (or JVM)
> > intrinsic mechanism for this.
>
> How much heap space do you have set?! Why don't you just increase it?
>
> If not, why not decrease the number of users you allow onto the server?
>
> Restarting Tomcat is even more 'blunt' then allowing access to
> fewer users...
>
> Confused...
>
> Andrew
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message