Re: [sqlalchemy] StaleDataError occur in used connection of QueuePool

2016-11-29 Thread mike bayer
On 11/29/2016 02:37 AM, Hongxin Song wrote: This is my code, excuted in multi-thread scene : | engine = create_engine(DB_URL, pool_size=100, max_overflow=1000,pool_recycle=4 * 3600) "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py ", line 716, in

[sqlalchemy] StaleDataError occur in used connection of QueuePool

2016-11-28 Thread Hongxin Song
This is my code, excuted in multi-thread scene : engine = create_engine(DB_URL, pool_size=100, max_overflow=1000,pool_recycle=4 * 3600) metadata.bind = engine # RawSession - original session in sqlalchemy # ScopedSession - thread local session RawSession = sessionmaker( autocommit=False,