Re: [sqlalchemy] SQLAlchemy Memory Leak

2020-03-04 Thread Mike Bayer
produce a script that reproduces the same results and share it here. this means writing a small script that looks like the same thing you are doing, but without your whole environment. if it does not leak memory, then you have to slowly change one element at a time until it looks more and more l

Re: [sqlalchemy] SQLAlchemy Memory Leak

2020-03-04 Thread Ahmed Cheikh
I tried the obj.expire(obj) and it did unfortunately not change anything. I still have accumulating used memory for whatever reason. When I did profile the code I saw that sometime engine objects use memory and sometimes session. Do any of you guys have any other suggestions Le jeudi 27 févri

Re: [sqlalchemy] SQLAlchemy Memory Leak

2020-02-26 Thread João Miguel Neves
Hi, When you go through the objects, do you remove them from the session with session.expire(obj)? Hope this helps, João On Wed, 26 Feb 2020 at 17:09, Ahmed Cheikh wrote: > Hello Everybody, > > I used SQLAlchemy in one of my projects. And in this project, I loop over > many objects. I use for

[sqlalchemy] SQLAlchemy Memory Leak

2020-02-26 Thread Ahmed Cheikh
Hello Everybody, I used SQLAlchemy in one of my projects. And in this project, I loop over many objects. I use for each object the same engine and session object to query from my database. What I noticed is that for each loop, there is an increase in the memory usage. I checked all the other