[Twisted-web] Guard, LastPage Memory Leak?

Federico Tomassini federicotom at yahoo.it
Mon Jul 27 19:36:24 EDT 2009


I'm running a guarded app. Memory is not released on logout.
I read carefully nevow.guard and I'm debugging widely with
pdb and gc.

I encountered the following problem. It sounds really strange.
I discovered, using pdb and gc inside logoutPortal(), that
visited pages remain alive.

So, I created a WastingMemPage(rand.Page) class that, on __init__,
allocates ton of mem (no external referrer, memroy is allocate
inside the instance only). I will return it initializing each

    def locateChild(self, ctx, segs):
       return WastingMemPage(), segs

Now, each time I hit one of this WastingMemPage, memory
usage grows. When I logout ( portalLogout() ), memory is
not released.


  * Is a rend.Page() not deleted once rendered?
  * Altough the previous question, why pages remain
    linked from something after portalLogout()?

What's happening? Am I making some mistake? Is there some
limit on portalLogout()?

py 2.5/2.4. Nevow 0.9.31.

Please, help!

Today is Pungenday, the 62nd day of Confusion in the YOLD 3175

More information about the Twisted-web mailing list