Search code examples
c#oracle-databaseodp

Connections gets closed and application hang with ODP.Net 4.122.19.1 (19) and Oracle database 11.2.0.4 with SQLNET.EXPIRE_TIME set


NOTE : Sorry this is not really a question but an information that may be usefull to people having the same issue.

We encountered a big issue with our application because a bug that seems not referenced by Oracle support.

I will not open a case because now the problem is known and we will workaround it, but it took long to get the point and I share here the information, may be this will save someone a day.

4.122.19.1 ODP.Net does not responds to DCD packets and the connection is considered as DEAD by the server after some minutes. The application hangs pending for new connections in the pool.

This happens connected to a 11.2.0.4 Oracle server and SQLNET.EXPIRE_TIME is set.

The application never stops and W3WP.exe should be killed

https://www.oracle.com/technetwork/database/enterprise-edition/oraclenetdcd-2179641.pdf

Debugdiag analysis may show below results.

DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr ByRef, IntPtr ByRef, Oracle.DataAccess.Client.OpoConValCtx* ByRef, Oracle.DataAccess.Client.OpoConRefCtx)+14c 
[[InlinedCallFrame] (Oracle.DataAccess.Client.OpsCon.Dispose)] Oracle.DataAccess.Client.OpsCon.Dispose(IntPtrByRef, IntPtrByRef, Oracle.DataAccess.Client.OpoConValCtx*ByRef, Oracle.DataAccess.Client.OpoConRefCtx) 
Oracle.DataAccess.Client.ConnectionPool.RegulateNumOfCons(System.Object)+9e7 
Oracle.DataAccess.Client.ConnectionPool.RegulateNumOfCons(System.Object)+3c3 
Oracle.DataAccess.Client.CPCtx.RegulateNumOfConsThreadFunc(System.Object)+135 
mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+163 
mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+14 
mscorlib_ni!System.Threading.TimerQueueTimer.CallCallback()+ba 
mscorlib_ni!System.Threading.TimerQueueTimer.Fire()+87 
mscorlib_ni!System.Threading.TimerQueue.FireNextTimers()+75 

Solution

  • Many thanks Patrick Beynio for your understanding, I now post this solution as an answer.

    Solution : disable DCD by removing SQLNET.EXPIRE_TIME in SQLNET.ORA on the server, or upgrade to a post 12.2 database version that have no more DCD packets but uses the TCP stack instead.