Is max_lifetime_session supported in thin mode or not? #407
-
I'm using python-oracledb in thin mode with In the doc API: ConnectionPool Objects it doesn't specify whether or not In the doc Connecting to Oracle Database it says that In the doc API: AsyncConnectionPool Objects it says that From looking at the thin pool source code it appears that it has getter and setter methods for So, am I right in concluding that I've received a report, for one of my Python apps using For my Is there anything else I can set, be it |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
I can confirm that The |
Beta Was this translation helpful? Give feedback.
-
Thanks @anthony-tuininga for confirming that, as I thought, it appears that I'm already doing everything I can on the python-oracledb side, given the currently available config options. If you're offering to implement this, I won't say no, it would be great if you could add it to your backlog. I've submitted an enhancement request |
Beta Was this translation helpful? Give feedback.
-
Is the connection hanging itself, or is it just remaining open after being released back to the pool and holding onto DB resources (ie. for efficiency)? Is your pool a fixed size? Are there frequent acquire/releases to the pool or are there periods when the app isn't doing any DB work? If the user has a special case which uses a lot of PGA and wants to clear that up, can they call ConnectionPool.drop(connection) explicitly? |
Beta Was this translation helpful? Give feedback.
-
@cjbj I'm pretty sure the connection isn't hanging, as I've got either a 30-second or (for a handful of exceptional queries) a 120-second It's a web app, generally doing quick calls (most but not all are under 1 second), acquiring a connection at the start of each HTTP request and releasing it at the end - so yes, quite frequent acquire / releases. Yes, there are periods when the app is doing little or no DB work, we have different environments for different clients / regions, and the app only receives significant traffic during business hours for a given environment. I wasn't aware of |
Beta Was this translation helpful? Give feedback.
I can confirm that
max_lifetime_session
is not supported in thin mode currently. That property, however, is one that simply ensures that a connection should be discarded after the interval takes place. If I recall correctly, however, this check is only done when a connection is returned to the pool or when a connection is being returned from the pool.The
timeout
value is supported in thin mode and that one will ensure that any idle connections that have been idle for the given period of time will be discarded from the pool. This sounds like what you are after. Themin
value will remain permanently, so if you were hoping to ensure that connections never remain alive for more than a certai…