We are using odp.net library: Oracle.ManagedDataAccess.Core 23.8.0
We are utilizing connectionString via proxy user and have the following attributes set:
Data Source=host:port/service; Connection Lifetime=0 Enlist=True; Max Pool Size=500; Min Pool Size=15; Pooling=True; Connection Timeout=60; Incr Pool Size=5; Decr Pool Size=1; UserId=user; Proxy User Id=proxyuser; Proxy User Password=proxyuserpassword
note: the pooling sizes do not seem to matter.
Randomly at times within our application either when trying to open an oracle connection using connection.Open() or when checking the current state of a connection using connection.State it appears the code gets “stuck” in a waiting status.
By analyizing the dump file from the .net application we are able to determine that both the connection.Open() and the connection.State both eventually call an AquireConnectionLocks method in which it appears to continually “wait”.
I am wondering what the possible scenarios could be in which the AcquireConnectionLocks method would in fact continue to wait. I have been able to verify that the .net application pool is not filled up nor is the database max sessions. In addition, the database does not show locks on anything.
Here is the stack trace to the code I am referring to…
- connection.State:
- stacktrace:
- Oracle.ManagedDataAccess.Client.OracleConnectionInternal
- method: public ConnectionState State
- code: in the get of the State property an if statement checks if the m_oracleConnectionImp ≠ null it then runs the AcquireConnectionLocks() method on the m_oracleConnectionImpl object. This is where it gets stuck waiting.
- connection.Open():
- stacktrace:
- OracleConnectionInternal.Open()
- OracleConnectionInternal.OpenInternal()
- OracleConnectionDispenser<>.Get
- OraclePoolManager.Get
- OracleConnectionImpl.DisConnect
- OracleConnectionImpl.Logoff
- method: internal void Logoff()
- code: first line inside the try block calls AcquireConnectionLocks(). This is where it gets stuck waiting.
Note: stack traces are different, but both end up calling the same method where it get stuck.
Hoping here to get information as to what could possible make the AcquireConnectionLocks method to hang indefinitely.