[Twisted-web] Guard, LastPage Memory Leak?
Glyph Lefkowitz
glyph at twistedmatrix.com
Mon Jul 27 20:56:45 EDT 2009
On Mon, Jul 27, 2009 at 7:36 PM, Federico Tomassini <federicotom at yahoo.it>wrote:
> I encountered the following problem. It sounds really strange.
> I discovered, using pdb and gc inside logoutPortal(), that
> visited pages remain alive.
>
> That does seem pretty strange.
>
So, I created a WastingMemPage(rand.Page) class
Rather than wasting lots of memory to debug, why not use gc.get_referrers to
discover what's keeping your rend.Page instance alive? Perhaps it's an
object in your own application that you can get rid of. Or, if it's a bug
in Nevow, it will tell us where in Nevow.
* Is a rend.Page() not deleted once rendered?
It certainly *should* be, assuming nothing's hanging on to it...
> * Altough the previous question, why pages remain
> linked from something after portalLogout()?
>
I don't know.
What's happening? Am I making some mistake?
Without access to your code — and, I would imagine, a pretty extensive debug
log — I couldn't tell you exactly what's happening.
Can you construct a minimal example which demonstrates the problem, which
someone on this list could run and debug?
> Is there some limit on portalLogout()?
>
No. The behavior you're noticing sounds like a definite bug somewhere; if
not in your code then in Nevow itself.
py 2.5/2.4. Nevow 0.9.31.
>
Have you tried Nevow trunk at HEAD? Does the problem still exist?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20090727/222c0d04/attachment.htm
More information about the Twisted-web
mailing list