[SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]

项目部署在IIS上,之前一直运行良好,前段时间出现过一次站点无法访问的情况,重启程序池就好了。这次的错误信息如下:

在SSMS里执行存储过程速度需要1秒,但是通过asp.net页面请求,却得到了30.02秒超时的结果。错误结果如下:

[SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.] 

... ... 大意是指数据库超时

熟悉我的朋友都知道,废话不多说,直接上地址:

https://docs.microsoft.com/en-us/answers/questions/466818/execution-timeout-expired-the-timeout-period-elaps.html

https://blog.csdn.net/qq_42391371/article/details/101208429

执行 下方命令,清除数据库统计信息(try to clear the statistics to make sure the database's statistics and/or query plan cache are correct)

 exec sp_updatestats

像第二篇文章所述,这个命令也没有解决根本问题,不过是扬汤止沸,还没有找到根本原因。

原文地址:https://www.cnblogs.com/zinan/p/15167064.html