Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ORA-50012: Pooled connection request timed out" when timeout transaction in >= .net8 #442

Open
mishustin opened this issue Feb 13, 2025 · 2 comments

Comments

@mishustin
Copy link

mishustin commented Feb 13, 2025

Hello!

I have a simple example that reproduces the error “ORA-50012: Pooled connection request timed out”. After the error occurs, the oracle connection pool does not issue any more connections and the application hangs without accessing the database, only restarting (i.e. resetting the oracle connection pool) helps.
The error is reproduced only on versions starting from .net8, on .net6 this error is not reproduced. It occurs if the transaction timeout is less than the code execution time inside the transaction.

OS: Microsoft Windows NT 10.0.19045.0
.net version: 8.0.12
configuration buils: release
Microsoft.EntityFrameworkCore Version 8.0.12
Oracle.EntityFrameworkCore Version 8.23.70
Oracle.ManagedDataAccess.Core" Version 23.7.0

Example
https://github.com/mishustin/OracleTransactionApp/tree/ORA-50012

Image

Is this bug?
Can you help me?

@alexkeh
Copy link
Member

alexkeh commented Feb 14, 2025

I ran your test case. For the .NET 6 setup, I see the transaction timeout. However, the .NET 8 setup doesn't trigger a transaction timeout. I suppose that means the connection time out cannot occur.

Can you generate an ODP.NET level 7 trace file, which should also indicate why the connection time out occurs?

You can also try using the ODP.NET 21c version for EF Core 8 to see if that works. There have been several changes to connection pool behavior between 21c and 23ai, one of which could be the reason for the time out you observe.

@mishustin
Copy link
Author

mishustin commented Feb 14, 2025

You should repeat the run a few times on .net8, usually on the second or third time there is a transaction timeout and then immediately an error getting a connection from the oracle connection pool.

In this version configuration, the error “ORA-50012: Pooled connection request timed out” does not really occur and connections are returned from the connection pool after other errors, that's okay

“Microsoft.EntityFrameworkCore” Version=“8.0.12”
“Oracle.EntityFrameworkCore” Version=“8.21.170”
“Oracle.ManagedDataAccess.Core” Version=“3.21.170”

Ironically, we switched to a new version of the library to add OpenTelemetry tracing to understand the cause of the “ORA-50012: Pooled connection request timed out” error

Trace is here

ORACLETRANSACTIONAPP.EXE_PID_17040_DATE_2025_02_14_TIME_13_38_54_136029.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants