System.Data.EntityException: The underlying provider failed on Commit

痴心易碎 提交于 2019-11-30 11:06:41

My bet is that the success response from the transaction commit command was not sent (or not sent fast enough) causing an exception in your code. A kinda crazy edge case. Exceptions of this kind dont necessarily mean that the actual execution of the command failed just that there was A failure.

In the same way if there was a problem sending the response from a webservice call it wouldn't necessarily imply that any side effects of that call were not applied.

phil soady

+1 for Luke, the explanation is good. The wording of error is unfortunate.

System.Data.EntityException: **The underlying provider failed on Commit.** ---> 
System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior 

should be read

System.Data.EntityException: **The underlying provider failed to respond to Commit**
System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior 

the likely causes are Network OR Server issues. e.g. 100 CPU, or other server delay, are all still correct. BUT you do NOT KNOW if it has committed or not, if this is a timeout case. If a response was received with failed, The DB should have rolled back. Of course if that didn't happen, then the DB has hummm crashed and resulted in potential corruption. Rare i hope.

I have seen in a 1 billion+ row table... During space allocation under growth, as index and data area needs expanding, take more than 30 secs. BUT the COMMIT DID happen. Client had timed out. Online re-orgs can cause such delays as well (well I've seen that on DB2 at least)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!