Re: [sqlalchemy] Debugging memory leaks

2022-01-11 Thread Anupama Goparaju
es are being created. These are usually created for a > MetaData collection at the module level and would not be constructed on a > continuous basis so you might want to look for patterns where Table objects > are being created per-request, something like that. > > > > >

Re: [sqlalchemy] Turn off connections invalidation functionality

2022-01-11 Thread Anupama Goparaju
cx-oracle SessionPool is used underlying that will probe connections on checkout and recover. Hence, trying to disable SQLAlchemy invalidate pool. Thanks! On Monday, January 10, 2022 at 12:04:57 PM UTC-8 Mike Bayer wrote: > > > On Mon, Jan 10, 2022, at 1:30 PM, Anupama Goparaju wrote: &

Re: [sqlalchemy] Turn off connections invalidation functionality

2022-01-10 Thread Anupama Goparaju
, 'handle_error') def receive_handle_error(exception_context): if exception_context.invalidate_pool_on_disconnect: exception_context.invalidate_pool_on_disconnect = False On Thursday, January 6, 2022 at 10:03:55 AM UTC-8 Anupama Goparaju wrote: > Thanks, i will give it a try. > > On

Re: [sqlalchemy] Turn off connections invalidation functionality

2022-01-06 Thread Anupama Goparaju
ed, Jan 5, 2022, at 7:35 PM, Anupama Goparaju wrote: > > I haven't read the response before and tried to skip the lib logic by > overriding the function below in my child call extending the NullPool to do > nothing. Is this safe to do? > > def _invalidate(self, connection, ex

[sqlalchemy] Debugging memory leaks

2022-01-05 Thread Anupama Goparaju
Hi, We are trying to debug memory leaks in our flask app that is using SQLAlchemy version 1.3.16. When i was using tracemalloc python library and comparing the memory snapshots, I found the below lines repetitively appearing in the snapshot differences: Could you please help us in providing us

Re: [sqlalchemy] Turn off connections invalidation functionality

2022-01-05 Thread Anupama Goparaju
PM UTC-8 Anupama Goparaju wrote: > Great, thanks for the info. > > On Friday, November 26, 2021 at 9:30:02 AM UTC-8 Mike Bayer wrote: > >> I've spent some time thinking about what might be being asked here. >> the only thing I can think of is that when a partic

Re: [sqlalchemy] Turn off connections invalidation functionality

2022-01-05 Thread Anupama Goparaju
1:51 AM, Mike Bayer wrote: > > Im not sure if I understand the question? if you don't call > .invalidate(), then the connection is not invalidated. > > what does "turn off" mean ? > > > > On Fri, Nov 26, 2021, at 11:17 AM, Anupama Goparaju wrote: > >

[sqlalchemy] Turn off connections invalidation functionality

2021-11-26 Thread Anupama Goparaju
Hi, Is there a way to safely turn off connection invalidation functionality (based on invalidation time set, all the connections created prior to the timestamp are invalidated) in sqlalchemy? https://github.com/Noethys/Connecthys/blob/master/connecthys/lib/sqlalchemy/pool.py#L574 Thanks,

Re: [sqlalchemy] Binding a connection to a SQLAlchemy session object

2021-05-18 Thread Anupama Goparaju
ok great! thanks again! On Monday, May 17, 2021 at 4:32:02 PM UTC-6 Mike Bayer wrote: > > > On Mon, May 17, 2021, at 6:22 PM, Anupama Goparaju wrote: > > Thanks for the quick reply. Correct, using the same recipe of cx_Oracle > SessionPool + SQLAlchemy NullPool. > If we

Re: [sqlalchemy] Binding a connection to a SQLAlchemy session object

2021-05-17 Thread Anupama Goparaju
and also any rollbacks on errors? On Monday, May 17, 2021 at 3:08:34 PM UTC-6 Mike Bayer wrote: > > > On Mon, May 17, 2021, at 4:21 PM, Anupama Goparaju wrote: > > Hi, > > I see in the documentation > <https://docs.sqlalchemy.org/en/13/orm/session_basics.html> th

[sqlalchemy] Binding a connection to a SQLAlchemy session object

2021-05-17 Thread Anupama Goparaju
Hi, I see in the documentation that we can bind a connection to a SQLAlchemy session object: # at the module level, the global sessionmaker, # bound to a specific Engine Session = sessionmaker(bind=engine) # later, some unit of

Re: [sqlalchemy] Connection pooling uses connections rather than sessions

2020-12-10 Thread Anupama Goparaju
my pool > implementation that wraps cx_Oracle's SessionPool. That could be > ultimately nicer to use and would be able to call acquire() / release() > directly without the need to use NullPool, but would be more work to > implement up front. > > > > On Wed, Dec 9, 20

Re: [sqlalchemy] Connection pooling uses connections rather than sessions

2020-12-09 Thread Anupama Goparaju
, Anupama On Wednesday, December 9, 2020 at 5:52:26 PM UTC-7 Anupama Goparaju wrote: > Hi. > > I would like to know how to use a cx-oracle SessionPool with SQLAlchemy. > We are leveraging the Session object of SQLAlchemy but we would like to > use the driver level pooling instead of

Re: [sqlalchemy] Connection pooling uses connections rather than sessions

2020-12-09 Thread Anupama Goparaju
Hi. I would like to know how to use a cx-oracle SessionPool with SQLAlchemy. We are leveraging the Session object of SQLAlchemy but we would like to use the driver level pooling instead of SQLAlchemy pool. Please advise. Thanks, Anupama On Monday, October 3, 2011 at 12:23:58 PM UTC-6 Mike