Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Deepa.

Asked: May 25, 2023 - 7:27 am UTC

Last updated: January 29, 2024 - 4:02 am UTC

Version: 19c

Viewed 1000+ times

You Asked

I am facing issue of "Pooled connection request timed out" when I upgraded database to 19c and moved the application to cloud(TAS) from VM.
There is no fixed scenario when this happens. No code changes has been done except replacing DataAccess.dll to ManagedDataAccess.dll. SGA is set to 2GB. TAS memory is 2GB. Could you suggest me what configurations has to be setup or checked to support pooling, as I am developer and can delegate the same to DBA to have such configurations on database

and Connor said...

"Pooled connection request timed out" most commonly means you *do* have pooled connections, but you do not have any entries left in the pool to connect to.

Things to check

- connection storm (if your pool is 10, and 11 people all come in at once)
- insufficient pool size
- failure in connection disposal (you grab a connection, you *think* you're now done with, but the driver still thinks you're using it and thus wont release the connection back to the pool).
- long running transactions.

Turn on some tracing and check your ODP logs.

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Pool connection timeout even after server restart

Deepa Durdi, December 06, 2023 - 7:03 am UTC

Hello,

In continuation with my previous question, the pool connection timeout is still occuring.
I beg you to please look on to this issue.

Library: 19.19.0
Connection string details:

Data Source=(DESCRIPTION=(ADDRESS_LIST=(FAILOVER=on)(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=****)(PORT=***))(ADDRESS=(PROTOCOL=TCP)(HOST=***)(PORT=***)))(CONNECT_DATA=(SERVICE_NAME=))); user id=USER_ID=**;password=**;persist security info=true;enlist=true",

Stack trace:

{"OracleLogicalTransaction":{}, "Errors":[{"DataSource":"", "Message":"Pooled connection request timed out", "Number":-1012, "ParseErrorOffset":-1, "Procedure":"", "Source":"Oracle Data Provider for .NET, Managed Driver", "ArrayBindIndex":-1}], "DataSource":"", "Message":"Pooled connection request timed out", "Procedure":"", "Source":"Oracle Data Provider for .NET, Managed Driver", "Number":-1012, "IsRecoverable":false, "ErrorCode":-2147467259, "Data":{}, "TargetSite":"PR Get(OracleInternal.ConnectionPool.ConnectionString, Boolean, Oracle.ManagedDataAccess.Client.OracleConnection, System.String, Boolean)", "StackTrace":" at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, OracleConnection connRefForCriteria, String affinityInstanceName, Boolean bForceMatch)\r\n at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, OracleConnection connRefForCriteria, String affinityInstanceName, Boolean bForceMatch)\r\n at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, OracleConnection connRefForCriteria)\r\n at Oracle.ManagedDataAccess.Client.OracleConnection.Open()\r\n at TSISData.DbConnection.OpenConnection()",
Connor McDonald
December 07, 2023 - 6:31 am UTC

If you head into Windows performance monitor, the ODP.NET driver should record statistics such as

NumberOfActiveConnectionPools
NumberOfActiveConnections
NumberOfFreeConnections
NumberOfInactiveConnectionPools
NumberOfNonPooledConnections
NumberOfPooledConnections
NumberOfReclaimedConnections
NumberOfStasisConnections

Compare those with how you have configured the min/max pool size for your connection pool

19c pooled connection timeouts

Gary, January 24, 2024 - 8:40 pm UTC

We have a similar interesting issue but it is with the unmanaged ODP.NET DataAccess and in our case it is using connection pooling. When we were on the 12.2.0.1 drivers, it closed out connections and the pool connections went from active to free. Now with 19c (19.3) drivers, according to performance monitor, connections stay active. In the database the sessions are connected but inactive.

Is the only possible source of the error "Pooled connection request timed out" from the ODP.NET Unmanaged driver? Can it come from Managed ODP.NET Can it come from the ODBC connection pooling?

Connor McDonald
January 25, 2024 - 5:54 am UTC

Sorry, thats getting beyond my knowledge on ODP. I think you'll need to log a call with Support on that one

Thanks - I found the culprit

Gary, January 26, 2024 - 4:50 am UTC

I am pretty sure having looked through all of the documentation that it is limited to the ODP.NET Unmanaged. And, I found the place where it was missing the .Clost()

Best Regards
Connor McDonald
January 29, 2024 - 4:02 am UTC

Thanks getting back to us.