#6 OutOfMemory risk with SessionStorage

closed
nobody
None
5
2005-02-23
2004-03-04
No

Currently AFAIK, when you use the Session storage
Storage object, every time an image is generated,
it is stored in the session.
When the same client asks for the same chart at an
interval, 2 ChartImage will be stored in the session.
If you have a lot of client, the session will be
overwhelmed with unused objects that will only be
destroyed on timeout.

So I added an boolean option in the img
tag "removeAfterDisplay" (defaults to true)
which send this request parameter to the renderer
servlet so that the renderer decides wether he should
remove the Object from the Storage or not.
In order to do that, I added the method

public ChartImage removeChartImage(String cid,
HttpServletRequest request)
throws CewolfException;

in the Storage interface and implemented it in the
subclasses.

Philippe Mouawad

Discussion

  • Philippe Mouawad

    Proposal

     
  • John Schwartzman

    Logged In: YES
    user_id=871678

    Does your solution care what storage method is used?

    I was using TransientSessionStorage and getting lots and lots
    of serialization errors - mainly when the webapp is shutting
    down. It was suggested that I change to
    de.laures.cewolf.storage.ClusterableSessionStorage, even
    though my application isn't clustered. This does seem to
    eliminate the problem.

    Do you have any experience with this?

     
  • Brian Fox

    Brian Fox - 2005-02-23
    • status: open --> closed
     

Log in to post a comment.