System.Data.Entity.Infrastructure.CommitFailedException: An error was reported while committing a database transaction but it could not be determined whether the transaction succeeded or failed on the database server. See the inner exception and http://go.microsoft.com/fwlink/?LinkId=313468 for more information. ---> System.Data.SqlClient.SqlException: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: 等待的操作过时。

1、日志库初始化空间设置过大,自增长设置为10%,当超过初始值后每次分配的空间过大操作时备份操作日志比较慢超时导致的!https://q.cnblogs.com/q/88805/
2、在数据库执行一下命令就好了:exec sp_updatestats; https://www.cnblogs.com/xujie520/p/10748435.html

3、检查数据库日志文件,发现日志文件大小四十多G,数据日志文件自动增长模式为10%来增长  相当于一次性增长4个多G

sqlserver数据库日志文件自动扩容时需要做很多的事情,非常消耗性能,因此再扩容期间;对于数据库的操作就都会被延迟等等;等到文件扩容结束才能恢复正常

https://blog.csdn.net/liuci820/article/details/79927734     解决方案:

1.先对现有数据库日志文件进行清理;采用压缩方式将日志数据清理掉

2.修改日志文件自动增长方式;不要按照百分比进行增长,根据自己数据库文件大小增长情况合理设置 ;一般设置一次增长再100—200M;

4、https://www.cnblogs.com/Jesse-Li/p/7473178.html

5、设置sqlserver内存占用只使用60%,保证内存充足

6、数据库连接字符串添加;MultipleActiveResultSets=True;

code first System.Data.Entity.Infrastructure.CommitFailedException: An error was reported while committing a database transaction but it could not be determined whether the transaction succeeded的更多相关文章

  1. EF 更新数据出现 System.Data.Entity.Infrastructure.DbUpdateConcurrencyException: 异常

    EF6更新 数据出现 System.Data.Entity.Infrastructure.DbUpdateConcurrencyException: Store update, insert, or  ...

  2. System.Data.Entity.Infrastructure.DbUpdateException

    异常描述:   捕捉到 System.Data.Entity.Infrastructure.DbUpdateException  HResult=-2146233087  Message=无法更新 E ...

  3. system.Data.Entity.Infrastructure.DbUpdateConcurrencyException: Store update, insert, or delete statement affected an unexpected number of rows (0) 问题

    页面控件没有做限制.提交后还可以继续点击,造成了在短时间内的多次请求.查看日志两次错误在200ms之内. 错误信息 system.Data.Entity.Infrastructure.DbUpdate ...

  4. ef添加数据时出错 System.Data.Entity.Infrastructure.DbUpdateConcurrencyException”类型的异常

    找半天才找到 ef添加数据时出错原因:数据库表中没有主键 ,就算表中有自增列 Added方法也会报错: -        this._db.SaveChanges() “this._db.SaveCh ...

  5. .net mvc System.Web.Optimization 、System.Data.Entity.Infrastructure找不到

    在MVC4的开发中,如果在App_Start目录下BundleConfig.cs类没有找不到引用System.Web.Optimization,可以使用程序包管理控制台进行安装到使用的项目 打开 工具 ...

  6. Mysql EF 触发器生成主键id 存储区更新、插入或删除语句影响到了意外的行数(0)。实体在加载后可能被修改或删除。刷新 ObjectStateManager 项 ;System.Data.Entity.Infrastructure.DbUpdateConcurrencyException

    http://stackoverflow.com/questions/24725261/how-to-use-a-custom-identity-column-in-sql-with-entity-f ...

  7. 报错:System.Data.Entity.Infrastructure.DbUpdateException 更新条目时出错

    背景 往数据库添加数据,前端验证通过的情况下,提交报错,程序停在了SaveChanges()这行,并报如上错误. 分析 猜想是提交的领域模型不符合数据库要求,但不知道具体哪里出错.网上查资料,有人发现 ...

  8. 【model模型传入view的数据类型错误】传入字典的模型项的类型为“System.Data.Entity.Infrastructure.DbQuery`1[MapScience.PovertyAlleviation.Web.Models.Qu

    出现这个问题的原因是控制器中传给view的数据类型与View中设置的model类型不一致导致,比如控制器返回的IList类型的,而你在View里面model设置的是IEnumerable<> ...

  9. MVC开发中的常见错误-05-无法将类型“System.Data.Entity.Infrastructure.DbQuery<BBFJ.OA.Model.RoleInfo>”转换为“System.Collections.Generic.List<BBFJ.OA.Model.RoleInfo>”

    List<RoleInfo> roleInfoList = (List<RoleInfo>)ViewBag.AllRoles; 错误原因很明确了 ViewBag.AllRole ...

随机推荐

  1. php小程序生成二维码

    <?php getwxacode(); //生成二维码 function getwxacode(){ $url = "https://api.weixin.qq.com/wxa/get ...

  2. eclipse经常弹出Subversion Native Library Not Available解决方案

  3. java 求数组最大子序列之和

    经典问题: 给定一个int[]数组,求其最大子序列之和(条件:数组中不全部都是负数). 最优算法,线性时间复杂度: public static int maxSubSum(int[] a){ int ...

  4. 关于session和cookie的区别

    以前对于session和cookie的认识,就只是粗略的知道cookie保存在客户端,而session则保存在服务端. 如今查了些资料,对session和cookie也有了一个初步的认识,现在来总结一 ...

  5. Delphi 保留字

  6. 用python实现js语言里的特性

    有大佬说:“搜 arraybuffer 的 polyfill 然后翻译成 python就行了” ...

  7. Codeforces1223E. Paint the Tree(树形dp)

    题目链接:传送门 题目大意: 给出节点数为n的一棵带权树,和每个点的最大染色数k.一条边的权重w能产生价值w的条件是,这条边的两端的点至少有一个颜色相同.颜色种类数无限,但每种只能使用两次,问能产生的 ...

  8. Java学习02-web.xml配置详解

    <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http:// ...

  9. Codeforces Round #568 (Div. 2) D. Extra Element

    链接: https://codeforces.com/contest/1185/problem/D 题意: A sequence a1,a2,-,ak is called an arithmetic ...

  10. Codeforces Round #568 (Div. 2) A.Ropewalkers

    链接: https://codeforces.com/contest/1185/problem/A 题意: Polycarp decided to relax on his weekend and v ...