[Twisted-web] Guard, LastPage Memory Leak?

Federico Tomassini federicotom at yahoo.it
Tue Jul 28 07:23:15 EDT 2009

Dear Glyph,

see answers below. I'm debugging with pdb and gc. Maybe I
discovered something, but the debug process is slow.

Glyph Lefkowitz wrote:

>     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.

Ok. on Page.afterRender() I put `self` on a list. After 5 hits
to this page, I'm checking where these pages are referred.
I have this for the first page on the list:

   WovenContext(tag=None, remembrances={'nevow.inevow.IMacroFactory':
	<myfile.pages.MyPage object at 0x4069eeac>})

Do this tell you something?

> 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?

Yes. I will build a minimal framework.

Today is Prickle-Prickle, the 63rd day of Confusion in the YOLD 3175

More information about the Twisted-web mailing list