zoukankan      html  css  js  c++  java
  • 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;

  • 相关阅读:
    es6之Promise
    es6之Proxy,Reflect
    js之对象
    Set,Map与Array,Object对比
    es6之数据结构 set,WeakSet,mapWeakMap
    es6之Symbol
    flex布局
    盒子模型,top和margin-top
    POJ1274-The Perfect Stall
    Codeforces 671D. Roads in Yusland 题解
  • 原文地址:https://www.cnblogs.com/slyzly/p/11940885.html
Copyright © 2011-2022 走看看