[sqlalchemy] Long running transaction issues with commit

2011-06-02 Thread Aalok Sood
Hello Everyone My mysql server wait_timeout is set to 35. and if i run this code: # Session s made with autocommit=False mm=s.query(ss.Machine).get(1) In [9]: In [10]: for i in range(1000): : sleep(15) : print commiting : s.commit() : sleep(25)

Re: [sqlalchemy] Long running transaction issues with commit

2011-06-02 Thread Michael Bayer
The Session doesn't interact with the database until statements are first emitted, so while its being put into a new transaction each time with your block of code, probably nothing is being sent to the DB. If you stuck a line: s.execute(select 1) in there, that would likely wake it up. On