[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,

Re: [sqlalchemy] Re: memory of query cache not release when session close

2015-11-30 Thread Hongxin Song
:00,Michael Bayer写道: > > > > On 11/27/2015 05:20 AM, Hongxin Song wrote: > > In multithreaded scenarios , it is a serious problem , because the > > server will be oom > > that's part of CPython, first see: > > > > http://effbot.org/pyfaq/why-doesnt-pytho

[sqlalchemy] memory of query cache not release when session close

2015-11-27 Thread Hongxin Song
when I query a lot of record from mysql by session.query, which is one million more, and the size of memory reaches to 2G Byte , I want to release the

[sqlalchemy] Re: memory of query cache not release when session close

2015-11-27 Thread Hongxin Song
In multithreaded scenarios , it is a serious problem , because the server will be oom 在 2015年11月27日星期五 UTC+8下午4:44:50,Hongxin Song写道: > > > <https://lh3.googleusercontent.com/-JTTCeJzu3V0/VlgX4JxTCkI/AAo/K9fx7wj3LUc/s1600/694275B6-CFE4-49AE-81C1-51F80C67630A.png> >