EF4 and DevARt 8.4.389 random transaction exception

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Dypsok
Posts: 5
Joined: Tue 13 Feb 2018 18:06

EF4 and DevARt 8.4.389 random transaction exception

Post by Dypsok » Tue 13 Feb 2018 18:12

Hello,
I have a WCF C# web service (EF4 and devart driver for oracle 8.4.389.0) that is called each 5 secondes and do a lot of work : it hit the oracle 11g database to extract various informations.

and under heavyload I got this kind of error messages :

Code: Select all

system.data.entityexception : underlying provider failed on Open
---> System.Transactions.TransactionException: The operation is not valid for the state of the transaction. 
---> System.TimeoutException: Transaction Timeout
   --- End of inner exception stack trace ---
   at System.Transactions.TransactionState.EnlistVolatile(InternalTransaction tx, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction)
   at System.Transactions.Transaction.EnlistVolatile(IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions)
   at Devart.Common.DbConnectionInternal.EnlistToDistributedTransactionInternal(Transaction transaction)
   at Devart.Common.DbConnectionInternal.e()
   at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
   at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
   at Devart.Common.DbConnectionBase.Open()
   at Devart.Data.Oracle.OracleConnection.Open()
   at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
   --- End of inner exception stack trace ---
   at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
   at System.Data.EntityClient.EntityConnection.Open()
   at System.Data.Objects.ObjectContext.EnsureConnection()
   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1[TResult](IEnumerable`1 sequence)
   at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
   at BSServices.Catalog.GetProductInfo(String tenantId)
I have read a lot about transactions but not found any reason why my service is failing.
I have checked the MSDTC log on my web server and db server and I haven't found any trace about a distributed transaction. I have really no any clue about what is going on here. could you help me with the stacktrace or tell me where to search further?

Dypsok
Posts: 5
Joined: Tue 13 Feb 2018 18:06

Re: EF4 and DevARt 8.4.389 random transaction exception

Post by Dypsok » Wed 14 Feb 2018 17:42

Noone here could help me with my problem or give me some hint to what to search for ?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: EF4 and DevARt 8.4.389 random transaction exception

Post by Shalex » Thu 15 Feb 2018 15:52

Please upload a small test project with the corresponding DDL/DML script to ftp://ftp.devart.com (credentials: anonymous / yourEmail) so that we can reproduce the issue in our environment and investigate it.

Dypsok
Posts: 5
Joined: Tue 13 Feb 2018 18:06

Re: EF4 and DevARt 8.4.389 random transaction exception

Post by Dypsok » Thu 15 Feb 2018 17:33

I am sorry but I could not share the private code.
Is there any known reason why such an exception could be raise :

Code: Select all

   --- End of inner exception stack trace ---
   at System.Transactions.TransactionState.EnlistVolatile(InternalTransaction tx, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction)
   at System.Transactions.Transaction.EnlistVolatile(IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions)
   at Devart.Common.DbConnectionInternal.EnlistToDistributedTransactionInternal(Transaction transaction)
Thank you

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: EF4 and DevARt 8.4.389 random transaction exception

Post by Shalex » Fri 16 Feb 2018 14:54

The error occurs in Microsoft's code in System.Transactions.Transaction.EnlistVolatile, so we cannot identify the reason of the issue.

Taking into account Transaction Timeout in your stack trace, we recommend you to look for a solution at:
* https://sankarsan.wordpress.com/2009/02 ... nsactions/
* https://blogs.msdn.microsoft.com/ajit/2 ... -the-code/

Post Reply