On Aug 17, 2007, at 11:19 PM, morgamic wrote:
Summary of the problem (pasted from issue 46):We have a combination of problems that are causing persistent memory leaks, especially on the list-by-signature page: 1) whenever we attach something to "c" in a controller, it sometimes leaks. I'm not quite sure why.
I can take a look at this one to see if there's some reason they wouldn't be cleared out.
2) whenever we perform an ORM query, the instance objects are never cleared from the ORM session. For the moment, I'm going to attach a patch to explicitly clear them, but I think we probably need a more systemic solution such as never attaching them to a session in the first place, or having a single session per request that is explicitly cleared at the end of the request.
I saw the patch to run clear. Usually this is done in the BaseController to clear the session. This is intended SQLAlchemy before, that the session will hold objects being tracked until cleared.
3) Related to 2 is the caching of instance objects: when we cache them to a file they cause leaks... it looks like the act of pickling them is what causes the leaks, not unpickling them: I can reproduce the leak even when I never request the same list more than once Any thoughts or suggestions? Thanks in advance. :)
Do you have an example of the leak? Or some of the code that can demonstrate it?
Cheers, Ben
smime.p7s
Description: S/MIME cryptographic signature
