here is your memory leak of _sessions: gc.set_debug( gc.DEBUG_UNCOLLECTABLE | gc.DEBUG_SAVEALL | gc.DEBUG_INSTANCES | gc.DEBUG_STATS ) #OBJECTS
pydoc gc: DEBUG_SAVEALL - Save objects to gc.garbage rather than freeing them. On Oct 26, 2007, at 5:35 AM, svilen wrote: > hi > i found 2 issues with latest SA: > > * r3449 introduces a memory leak if SA is used and then all cleaned > (clear_mappers() etc) - ArgSingleton is not cleared anymore and > grows. Same applies to orm.session._sessions, but i dont know whats > kept there. > $ python _test_leak.py repeat=10 leak > or > $ python _test_leak.py repeat=1000 > and watch memusage > > > * r3646 introduces some forever-recursion, goes like: > > File "other/expression.py", line 355, in <module> > p2 = session.query( Person).filter_by( name= 'pesho').first() > File "sqlalchemy/orm/query.py", line 595, in first > ret = list(self[0:1]) > File "sqlalchemy/orm/query.py", line 620, in __iter__ > context = self._compile_context() > File "sqlalchemy/orm/query.py", line 873, in _compile_context > value.setup(context) > File "sqlalchemy/orm/interfaces.py", line 483, in setup > self._get_context_strategy(querycontext).setup_query(querycontext, > **kwargs) > File "sqlalchemy/orm/strategies.py", line 553, in setup_query > value.setup(context, parentclauses=clauses, > parentmapper=self.select_mapper) > File "sqlalchemy/orm/interfaces.py", line 483, in setup > self._get_context_strategy(querycontext).setup_query(querycontext, > **kwargs) > File "sqlalchemy/orm/strategies.py", line 553, in setup_query > value.setup(context, parentclauses=clauses, > parentmapper=self.select_mapper) > > ... last two repeated ... > > > ciao > svilen > > > > > <_test_leak.py> > <_test_recursion.py> > <sa_gentestbase.py> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---