You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jeremy Levy <je...@gmail.com> on 2011/09/07 01:44:02 UTC

Terracotta Sessions and Wicket

We've been using Terracotta Sessions with Wicket successfully for some time
now with a fairly onerous side effect. The DiskPageStore temporary directory
grows steadily and never gets cleaned up, eventually leading to us having to
manually go and clean up the directory.

The issue appears to be that if a session fails over to the other node it
maintains the sessionid from the other server (as expected) however, because
we use sticky sessions via the jvmRoute in tomcat a session ID looks like
"2uWDurCx3V07Oe8LBn0V.node1" even if its currently on node2.

Therefore when the unbind/cleanup method of DiskPageStore/SessionEntry
attempts to clean it up it doesn't find anything and leaves the orphaned
session on the node where the session originated.

I was thinking that a easy fix for this would be to extend the DiskPageStore
and have it ignore the jvmRoute when serializing the session. Does this
sound like a good idea?

Thanks.

Jeremy



-- 
Jeremy Levy

Re: Terracotta Sessions and Wicket

Posted by Jeremy Levy <je...@gmail.com>.
Actually, after thinking about this some more, it has nothing to do with the
jvmRoute on the session per se, it's because the node from which the session
originated never has the unbind/method called for that session.



On Tue, Sep 6, 2011 at 7:44 PM, Jeremy Levy <je...@gmail.com> wrote:

> We've been using Terracotta Sessions with Wicket successfully for some time
> now with a fairly onerous side effect. The DiskPageStore temporary directory
> grows steadily and never gets cleaned up, eventually leading to us having to
> manually go and clean up the directory.
>
> The issue appears to be that if a session fails over to the other node it
> maintains the sessionid from the other server (as expected) however, because
> we use sticky sessions via the jvmRoute in tomcat a session ID looks like
> "2uWDurCx3V07Oe8LBn0V.node1" even if its currently on node2.
>
> Therefore when the unbind/cleanup method of DiskPageStore/SessionEntry
> attempts to clean it up it doesn't find anything and leaves the orphaned
> session on the node where the session originated.
>
> I was thinking that a easy fix for this would be to extend the
> DiskPageStore and have it ignore the jvmRoute when serializing the session.
> Does this sound like a good idea?
>
> Thanks.
>
> Jeremy
>
>
>
> --
> Jeremy Levy
>



-- 
Jeremy Levy