[Seaside] Seaside sessions not being either unregistered or GCed
Mariano Martinez Peck
marianopeck at gmail.com
Sat Jul 4 13:13:08 UTC 2015
On Fri, Jul 3, 2015 at 7:09 PM, Bob Arning <arning315 at comcast.net> wrote:
> FWIW, my old stand-by is
>
> WACache allInstances do: [ :e | e reap].
>
>
Thanks Bob,
I just tried that and indeed, after doing that and a GC, it removed almost
all garbage I have around and indeed, it called all the #unregistered of my
sessions.
So.... OK, with such code I can at least force the GC of those (which is
similar to the one I was doing: *WAApplication allInstances do: [ :each |
each clear ].)* , but... I still wonder, why my sessions are not "reap"
automatically? Why they do not get the #unregistered automatically? From
what I understand, they should, right?
> On 7/3/15 5:41 PM, Mariano Martinez Peck wrote:
>
> Hi guys,
>
> I am having a hard time to see why my seaside sessions are not being
> GCed nor unregistered.
> First of all, when I register my app, I set a timeout. I even tried with 1
> minute timeout:
>
> *app cache expiryPolicy configuration at: #cacheTimeout put: 60*
>
> I put a *halt in MySessionSubclass >> #unregistered* (which then calls
> super).
>
> I have seen many seaside things around:
>
> WARenderVisitor instanceCount -> 77.
> WAHtmlCanvas instanceCount -> 1061.
> JQueryClass instanceCount -> 13492.
> WACallbackRegistry instanceCount -> 77.
> MySessionSubclass -> 12.
> .....
>
> As you can see, I have plenty of memory around callbacks registries,
> renders, visitors, sessions etc... If I try to see which sessions were
> expired:
>
> *MySessionSubclass allInstances select: [ :each | (each instVarNamed:
> 'parent') isNil ] -> #() *
>
> The 'parent' instVar there is because "super unregistered" does that and
> I don't know another way to check if a session is expired or not.
>
> Finally, the only way I have to get rid of everything is this way:
>
> *WAApplication allInstances do: [ :each | each clear ].*
>
> But then, that clears all sessions...even the active ones which I don't
> want. *So.... how can I force the GC of all none expired sessions? And
> why my sessions are not receiving #unregistered ?*
>
> Note also that in my example the instanceCount of MySessionSubclass is
> bigger than 10, because somewhere I read that Seaside would start cleaning
> sessions upon 10th.
>
> So.... any idea? What am I doing wrong?
>
> Thanks in advance,
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
> _______________________________________________
> seaside mailing listseaside at lists.squeakfoundation.orghttp://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
--
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150704/80e8ff6f/attachment-0001.htm
More information about the seaside
mailing list