I saw many of the following errors last night in one of my projects using Entity Framework:
System.Data.EntityException: The underlying provider failed on Commit. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket() at System.Data.SqlClient.TdsParserStateObject.ReadBuffer() at System.Data.SqlClient.TdsParserStateObject.ReadByte() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler,SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest) at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest) at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransaction(TransactionRequest transactionRequest, String name, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest) at System.Data.SqlClient.SqlInternalTransaction.Commit() at System.Data.SqlClient.SqlTransaction.Commit() at System.Data.EntityClient.EntityTransaction.Commit() --- End of inner exception stack trace --- at System.Data.EntityClient.EntityTransaction.Commit() at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) at System.Data.Entity.Internal.InternalContext.SaveChanges() at System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
This error is intriguing since data was really written to the database. I noticed that the error code discovered a relevant article on an MS website. seemed to be network-related.
I need help with a few issues, specifically:
I appreciate it.
Using Spark for SQL, we were able to ascertain that a secondary SQL process from another group was hogging the CPU and interfering with the correct operation of our program. To put it briefly, we're going through with creating a second server to avoid additional disputes between the two teams.
The fact that the transaction really completed rather than failed makes the exception still intriguing.
My guess is that the exception in your code was caused by the transaction commit command's success response not being delivered (or not being sent quickly enough). a rather bizarre edge case. Exceptions of this kind don't always indicate that the command's actual execution failed—only that there was a A problem.
In the same manner, it wouldn't necessarily follow that any side effects of a webservice request weren't used if there was a difficulty transmitting the answer.