From time to time (mind you not always) we get the exception mentioned in the subject. The stacktrace is below. What could cause this?
[InvalidOperationException: This SqlTransaction has completed; it is no longer usable.] System.Data.SqlClient.SqlTransaction.ZombieCheck() +991813 System.Data.SqlClient.SqlTransaction.Commit() +76 Xtensive.Sql.SqlConnection.Commit() +67 Xtensive.Orm.Providers.StorageDriver.CommitTransaction(Session session, SqlConnection connection) +159
[StorageException: SQL error occured. SQL error details 'Type: Unknown;' Original message 'This SqlTransaction has completed; it is no longer usable.'] Xtensive.Core.JoiningDisposable.<dispose>b__1(Exception e) +28 Xtensive.Core.ExceptionAggregator.Execute(Action`1 action, T argument) +90
[AggregateException: A set of exceptions is caught.] Xtensive.Core.ExceptionAggregator.Dispose() +234 Xtensive.Core.JoiningDisposable.Dispose() +367 Xtensive.Core.DisposableExtensions.DisposeSafely(IDisposable disposable) +35 Xtensive.Orm.Web.<>cDisplayClass2.<providesession>b1(Boolean disposing) +97 Xtensive.Core.Disposable.Dispose(Boolean disposing) +43 Xtensive.Core.Disposable.Dispose() +36 Xtensive.Core.DisposableExtensions.DisposeSafely(IDisposable disposable) +35 Xtensive.Orm.Web.SessionManager.EndRequest(Object sender, EventArgs e) +84 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
asked Jan 16 '14 at 11:19
This problem was caused by our own code. For some reason the client sent changes for the same row twice which from time to time lead to deadlocks. The text of the exception threw us of track but after consulting with Denis this was resolved.
answered Jan 27 '14 at 08:20
I have the same problem. This error occurs because conection pooling. When exists two or more users acess the system the connetion pooling reuse a connetion and the transation too. If the first user execute commit ou rollback the transaction is no longe usable. by mybkexperience
answered Dec 14 '16 at 19:10