Is max_lifetime_session supported in thin mode or not? · oracle/python-oracledb · Discussion #407 (original) (raw)
I'm using python-oracledb in thin mode with AsyncConnectionPool
.
In the doc API: ConnectionPool Objects it doesn't specify whether or not max_lifetime_session
is supported in thin mode.
In the doc Connecting to Oracle Database it says that max_lifetime_session
is only supported in Thick mode.
In the doc API: AsyncConnectionPool Objects it says that AsyncConnectionPool
is only supported in thin mode, and it lists max_lifetime_session
as a supported attribute.
From looking at the thin pool source code it appears that it has getter and setter methods for max_lifetime_session
(I assume just to satisfy the interface that's expected of a "pool impl"), but it's not actually using self._max_lifetime_session
anywhere except in those getter and setter methods.
So, am I right in concluding that max_lifetime_session
has no effect if a value is set for it in thin mode?
I've received a report, for one of my Python apps using AsyncConnectionPool
, that sessions from the pool appear to be hanging on to PGA memory in Oracle for longer than they should. I'm looking into what else I can potentially tweak in python-oracledb, that might mitigate such an issue.
For my AsyncConnectionPool
, I'm already setting getmode
to SPOOL_ATTRVAL_TIMEDWAIT
, wait_timeout
to 10000
, min
to 1
, max
to 20
, increment
to 1
, and timeout
to 60
(and for connection objects, I'm also setting call_timeout
to 30000
).
Is there anything else I can set, be it max_lifetime_session
or otherwise, to ensure that connections in the pool get regularly closed, and their resources cleaned up?