<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 4, 2015 at 10:51 AM, Bob Arning <span dir="ltr">&lt;<a href="mailto:arning315@comcast.net" target="_blank">arning315@comcast.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <font face="Georgia">look for senders of #reap. There are different
      &quot;strategies&quot;</font> that do this under different circumstances.<div><div class="h5"><br></div></div></div></blockquote><div><br></div><div>Indeed, thanks!  It seems I am using the default one (since I do not specify a different one) and even I confirm this:</div><div><br></div><div><div>(WACache allInstances collect: [ :each | each reapingStrategy class ]) asSet -&gt; a Set(WAAccessIntervalReapingStrategy) </div></div><div> </div><div>And that class ends up using &quot;WAAccessIntervalReapingStrategyConfiguration instance&quot; which defines:</div><div><br></div><div><div>describeOn: config</div><div><span class="" style="white-space:pre">        </span>(config integer: #cacheReapInterval)</div><div><span class="" style="white-space:pre">                </span>comment: &#39;The number of cache stores that are allowed before expired objects are reaped from the cache.&#39;;</div><div><span class="" style="white-space:pre">                </span>default: 10</div></div><div><br></div><div>And still, at the very beginning of this email I showed how my sessions were not unregistered even if I had more than 10 instances around (I had 13 if I remember correctly). </div><div><br></div><div>mmmmm getting this code:</div><div><br></div><div>WACache allInstances collect: [ :each | each reapingStrategy instVarNamed: &#39;count&#39; ] -&gt; #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 2 5 0 0)<br></div><div><br></div><div>tells me that maybe I am misunderstanding the #cacheReapInterval. So maybe it is not 10 sessions... but that each cache (assume one per session and one per app) would be cleared only after something was stored there at least 10 times???  mmmmmm</div><div><br></div><div>mmmm more confused than before...</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
    <br>
    <div>On 7/4/15 9:13 AM, Mariano Martinez
      Peck wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Fri, Jul 3, 2015 at 7:09 PM, Bob
            Arning <span dir="ltr">&lt;<a href="mailto:arning315@comcast.net" target="_blank">arning315@comcast.net</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000"> <font face="Georgia">FWIW, my old stand-by is<br>
                  <br>
                  WACache allInstances do: [ :e | e reap].<br>
                </font>
                <div>
                  <div><br>
                  </div>
                </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>
              <div>Thanks Bob,</div>
              <div><br>
              </div>
              <div>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. </div>
              <div>So.... OK, with such code I can at least force the GC
                of those (which is similar to the one I was doing: <b style="font-size:12.8000001907349px">WAApplication
                  allInstances do: [ :each | each clear ].)</b>  ,
                but... I still wonder, why my sessions are not &quot;reap&quot;
                automatically? Why they do not get the #unregistered
                automatically? From what I understand, they should,
                right?</div>
              <div><br>
              </div>
            </div>
            <div><br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div>
                  <div>
                    <div>On 7/3/15 5:41 PM, Mariano Martinez Peck wrote:<br>
                    </div>
                  </div>
                </div>
                <blockquote type="cite">
                  <div>
                    <div>
                      <div dir="ltr">Hi guys,
                        <div><br>
                        </div>
                        <div>I am having a hard time to see why my
                          seaside sessions are not being GCed nor
                          unregistered. </div>
                        <div>First of all, when I register my app, I set
                          a timeout. I even tried with 1 minute timeout:</div>
                        <div><b><br>
                          </b></div>
                        <div><b>app cache expiryPolicy configuration at:
                            #cacheTimeout put: 60</b></div>
                        <div><br>
                        </div>
                        <div>I put a <b>halt in MySessionSubclass
                            &gt;&gt; #unregistered</b> (which then calls
                          super).</div>
                        <div><br>
                        </div>
                        <div>I have seen many seaside things around:</div>
                        <div><br>
                        </div>
                        <div>
                          <div>WARenderVisitor instanceCount -&gt; 77.</div>
                          <div>WAHtmlCanvas instanceCount -&gt; 1061.</div>
                          <div>JQueryClass instanceCount -&gt; 13492.</div>
                          <div>WACallbackRegistry instanceCount -&gt;
                            77.</div>
                        </div>
                        <div>MySessionSubclass -&gt; 12.</div>
                        <div>.....</div>
                        <div><br>
                        </div>
                        <div>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:</div>
                        <div><br>
                        </div>
                        <div>
                          <div><b>MySessionSubclass allInstances select:
                              [ :each | (each instVarNamed: &#39;parent&#39;)
                              isNil ]   -&gt; #()  </b></div>
                        </div>
                        <div><br>
                        </div>
                        <div>The &#39;parent&#39; instVar there is because
                          &quot;super unregistered&quot; does that and I don&#39;t
                          know another way to check if a session is
                          expired or not.</div>
                        <div><br>
                        </div>
                        <div>Finally, the only way I have to get rid of
                          everything is this way:</div>
                        <div><br>
                        </div>
                        <div>
                          <div><b>WAApplication allInstances do: [ :each
                              | each clear ].</b><br>
                          </div>
                          <div><span style="white-space:pre-wrap"><br>
                            </span></div>
                          <div><span style="white-space:pre-wrap">But
                              then, that clears all sessions...even the
                              active ones which I don&#39;t want. <b>So....
                                how can I force the GC of all none
                                expired sessions? And why my sessions
                                are not receiving #unregistered ?</b></span></div>
                        </div>
                        <div><span style="white-space:pre-wrap"><b><br>
                            </b></span></div>
                        <div><span style="white-space:pre-wrap">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. </span></div>
                        <div><span style="white-space:pre-wrap"><br>
                          </span></div>
                        <div><span style="white-space:pre-wrap">So....
                            any idea? What am I doing wrong?</span></div>
                        <div><span style="white-space:pre-wrap"><br>
                          </span></div>
                        <div><span style="white-space:pre-wrap">Thanks
                            in advance, </span></div>
                        <div><span style="white-space:pre-wrap"><br>
                          </span></div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>
                          <div><br>
                          </div>
                          -- <br>
                          <div>Mariano<br>
                            <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
                          </div>
                        </div>
                      </div>
                      <br>
                      <fieldset></fieldset>
                      <br>
                    </div>
                  </div>
                  <pre>_______________________________________________
seaside mailing list
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</pre>
                </blockquote>
                <br>
              </div>
              <br>
              _______________________________________________<br>
              seaside mailing list<br>
              <a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
              <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
              <br>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div>Mariano<br>
            <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
seaside mailing list
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</div></div>