Connection request timed out after 15 seconds
See original GitHub issueIt seems that #126 has not been fixed for some cases even after Oracle.ManagedDataAccess.Core v2.19.101 release.
Oracle.ManagedDataAccess.Client.OracleException (0x80004005): Connection request timed out
at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, OracleConnection connRefForCriteria, String affinityInstanceName, Boolean bForceMatch)
at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, OracleConnection connRefForCriteria, String affinityInstanceName, Boolean bForceMatch)
at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, OracleConnection connRefForCriteria)
at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken)
Elapsed when this error happens: 15.001 15.031 15.179 15.156 15.107 and so on a bit above 15 seconds timeout. The connection pool does not appear to be exhausted. We don’t explicitly size it, so I’m pretty sure the default is 100.
The example output from OracleConnection.Dump
when this happened:
(DUMP)
(CP) =================================
(CP) Data Source=(DESCRIPTION=(ENABLE=BROKEN)(LOAD_BALANCE=off)(FAILOVER=on)
(TRANSPORT_CONNECT_TIMEOUT=10)
(ADDRESS=(PROTOCOL=tcp)(HOST=<address1>)(PORT=1526))
(ADDRESS=(PROTOCOL=tcp)(HOST=<address2>)(PORT=1526))
(CONNECT_DATA=(SERVICE_NAME=<name>)(FAILOVER_MODE=(TYPE=session)(METHOD=basic))));
User Id=<id>;Password=;
(CP) pmid=
55059565(CP) =================================
(CP) <name> , <name2>:
(CP) list (count:1) : (2962:4287:T:F:F:F:N:<name>::<name2>)
(CP) queue (count:0) :
Names were replaces.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Oracle Data Provider for .NET: Connection request timed out
During normal operations things are fine but during heavy loads with 1 message per second, this occurs after running smooth for some time....
Read more >Timeout expired messages when connecting to SQL Server
Fixes timeout expired errors when you connect to SQL Server and helps you verify and ... Connection timeout (15 seconds by default) ...
Read more >Something is causing connection loss every 16-20 seconds
Method 2: Follow the steps: Step 1: Boot the computer in safe mode with networking and check if the issue persists.
Read more >The Connection Has Timed Out How To Fix It Tutorial - YouTube
The Connection Has Timed Out -- How To Fix It [Tutorial]. A server connection timeout means that a server is taking too long...
Read more >SSIS pkg using ODBC Connection is TIMING OUT with
PROBLEM: Receiving SSIS pkg: ODBC Connection Timeout - ERROR [HY000] The request timed out after '15' seconds.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The timeout occurs as managed ODP.NET is looking for libraries it expects in .NET FW, but is not part of .NET Core. Since the library is not found, the connection times out. There’s an ER (35402151) to improve the error message so that the app knows it has the wrong ODP.NET provider type loaded.
It seems that “connection timeout” also occurs when using a wrong version of the assembly. In our case, instead of 3.1.21.1 (.net core), the error occurred when due to a build error either 3.21.100 or (.net framework) 4.122.21.1 DLL were present. Somewhat confusing is that the managed driver DLL of Oracle.ManagedAccess.Core nuget package is also Oracle.ManagedAccess.dll.
A clear error occurs solely when the Oracle.ManagedDataAccess.dll is not present.
Maybe Oracle internally calls some code for a number of times and even with internal errors always returns a generic “connection timeout” from an exception handler?
Fix was to use the correct version of the DLL.