When I was using sqlalchemy 0.7.8 to manipulate database, it look's like the query have some memory leak..I have googled this problem for a long time, but no gains. I have tried run this snippet in a while loop. The code eat 1M every 5 second. environment is Python 2.7.3, mysql 5.5.25a, fedora 17.
the code is really simple. But the memory didn't release at session.close() Is it a mis-use? def query(g_engine): session = scoped_session(sessionmaker(bind=g_engine, autoflush=False)) q = session.query(AgentScript) for j in q.yield_per(100): print j session.commit() session.close() gc.collect() here is the same question on stackoverflow. http://stackoverflow.com/questions/12073375/is-this-sqlalchemy-memory-leak -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/BIH-1lmR6zgJ. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.