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
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的更多相关文章
- EF 更新数据出现 System.Data.Entity.Infrastructure.DbUpdateConcurrencyException: 异常
EF6更新 数据出现 System.Data.Entity.Infrastructure.DbUpdateConcurrencyException: Store update, insert, or ...
- System.Data.Entity.Infrastructure.DbUpdateException
异常描述: 捕捉到 System.Data.Entity.Infrastructure.DbUpdateException HResult=-2146233087 Message=无法更新 E ...
- system.Data.Entity.Infrastructure.DbUpdateConcurrencyException: Store update, insert, or delete statement affected an unexpected number of rows (0) 问题
页面控件没有做限制.提交后还可以继续点击,造成了在短时间内的多次请求.查看日志两次错误在200ms之内. 错误信息 system.Data.Entity.Infrastructure.DbUpdate ...
- ef添加数据时出错 System.Data.Entity.Infrastructure.DbUpdateConcurrencyException”类型的异常
找半天才找到 ef添加数据时出错原因:数据库表中没有主键 ,就算表中有自增列 Added方法也会报错: - this._db.SaveChanges() “this._db.SaveCh ...
- .net mvc System.Web.Optimization 、System.Data.Entity.Infrastructure找不到
在MVC4的开发中,如果在App_Start目录下BundleConfig.cs类没有找不到引用System.Web.Optimization,可以使用程序包管理控制台进行安装到使用的项目 打开 工具 ...
- 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 ...
- 报错:System.Data.Entity.Infrastructure.DbUpdateException 更新条目时出错
背景 往数据库添加数据,前端验证通过的情况下,提交报错,程序停在了SaveChanges()这行,并报如上错误. 分析 猜想是提交的领域模型不符合数据库要求,但不知道具体哪里出错.网上查资料,有人发现 ...
- 【model模型传入view的数据类型错误】传入字典的模型项的类型为“System.Data.Entity.Infrastructure.DbQuery`1[MapScience.PovertyAlleviation.Web.Models.Qu
出现这个问题的原因是控制器中传给view的数据类型与View中设置的model类型不一致导致,比如控制器返回的IList类型的,而你在View里面model设置的是IEnumerable<> ...
- 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 ...
随机推荐
- Almost Increasing Array CodeForces - 946G (dp)
大意: 定义几乎递增序列为删除不超过一个数后序列严格递增. 给定序列, 求最少改变多少个数能变为几乎递增序列. 跟hdu5256类似,
- [转载]Linux运行模式及紧急、救援模式
运行模式 在Linux中,存在一个叫init(initialize)的进程,其进程号是1,该进程存在一个对应的配置文件inittab,叫做系统的运行级别配置文件,位置在/etc/inittab.(但是 ...
- java io 文件下载功能
一. @RequestMapping(value = "/download/{filename}") public void downloadFile(HttpServletReq ...
- javaSql面试题(10题)
有如下四张表: 学生表Student(stuId,stuName,stuAge,stuSex): 课程表Course(courseId,courseName,teacherId): 成绩表Scores ...
- JSTL 的<c:if>标签没有else的解决办法
我们可以采用<c:choose>来代替<c:if> 具体结构: <c:choose> <c:when test=""> 如果 < ...
- SpringBoot+SpringCloud 笔记
SpringBoot总结 使用Typora打开https://pan.baidu.com/s/1tXS45j6ooXpnzhy1Zp78Gw 提取码: c8fi SpringCloud总结 使用XMi ...
- java内存区域及溢出异常
内存划分: java虚拟机在执行java程序过程中会把内存分为以下区域进行管理 线程私有的 虚拟机栈 局部变量表 基本数据类型 long和double占用两个slot 对象引用 返回地址 操作数栈 动 ...
- 一、Linux 设备驱动介绍及开发环境搭建(续)
1.2.6 uboot 编译安装 嵌入式 bootloader 的功能: 功能类似于 PC 的 BIOS.硬件检测是否正常 加载操作系统镜像到 RAM 设置不同的启动方式 常见的启动方式: NOR/N ...
- 现代操作系统第三版高清.pdf中文版免费下载
百度云盘:链接: https://pan.baidu.com/s/1i57XmxJ 密码: rmga
- 【洛谷P2447】外星千足虫
题目大意:给定一个 M 个含 N 个未知数的异或方程组,保证有解,若存在唯一解,给出至少需要几个方程才能得出唯一解,若不存在,直接输出不存在. 题解:异或方程组也满足类似初等行变换的操作,只不过所有的 ...