SSRS 2008 R2 错误:Timeout expired. The timeout period

本文涉及的产品
云数据库 RDS SQL Server,基础系列 2核4GB
RDS SQL Server Serverless,2-4RCU 50GB 3个月
推荐场景:
简介:

     今天遇到了Reporting Services(SQL SERVER 2008 R2)的报表执行异常情况,报表加载数据很长时间都没有响应,最后报“An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database.;”。 检查C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles下日志,发现ReportServerService__12_24_2014_10_29_02.log中有大量如 下错误:

library!WindowsService_4!1308!12/24/2014-01:27:53:: ;i INFO: Call to CleanBatch() 
 
library!WindowsService_4!1308!12/24/2014-01:32:53:: ;e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database.; 
 
dbcleanup!WindowsService_4!1308!12/24/2014-01:32:53:: ;e ERROR: Sql Error in CleanOrphanedSnapshots: Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. 
 
library!WindowsService_4!1308!12/24/2014-01:32:53:: ;i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions. 
 
library!WindowsService_4!1308!12/24/2014-01:32:53:: ;i INFO: Call to CleanBatch() ends 
 
library!WindowsService_4!13ec!12/24/2014-01:37:53:: ;i INFO: Call to CleanBatch() 
 
library!WindowsService_4!13ec!12/24/2014-01:42:53:: ;e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database.; 
 
dbcleanup!WindowsService_4!13ec!12/24/2014-01:42:53:: ;e ERROR: Sql Error in CleanOrphanedSnapshots: Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. 
 
library!WindowsService_4!13ec!12/24/2014-01:42:53:: ;i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions. 
 
library!WindowsService_4!13ec!12/24/2014-01:42:53:: ;i INFO: Call to CleanBatch() ends 
 
library!WindowsService_4!1308!12/24/2014-01:47:53:: ;i INFO: Call to CleanBatch() 
 
library!WindowsService_4!1308!12/24/2014-01:52:53:: ;e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database.; 
 
dbcleanup!WindowsService_4!1308!12/24/2014-01:52:53:: ;e ERROR: Sql Error in CleanOrphanedSnapshots: Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. 
 
library!WindowsService_4!1308!12/24/2014-01:52:53:: ;i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions. 
 
library!WindowsService_4!1308!12/24/2014-01:52:53:: ;i INFO: Call to CleanBatch() ends
 

 

检查了服务器的存储情况后,可以排除low disk问题,只能是connection failure, timeout的问题,于是我查看1点多的执行记录,发现取数据时间都是几百秒,如下截图所示

clipboard

 

我检查C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer下的rsreportserver.config,发现DatabaseQueryTimeout为120秒

image 

但是这些报表的SQL语句我在SSMS里面执行过,也只有1~2秒,根本不会超时的情况。当时我立马重启了SSRS服务后,问题解决。那么问题究竟出自哪里呢?搜索了网上很多资料,大致有下面一些原因:

 

原因1:SSRS服务崩溃了,不能响应用户请求。

These threads could help: SSRS 2008 crashing when running a report with huge amount of data long running report can not be rendered in Report Manager .....

    具体可以参见“参考资料”选URL中的讨论。

 

原 因2:Database deadlocks occur when you try to view an SSRS report in the SharePoint integrated mode after you update a data source

    具体可以参考官方文档http://support.microsoft.com/kb/2691331/en-us ,不过由于我们服务器并没有应用SharePoint integrated mode,所以应该可以排除。

 

 原因3:Cannot rename a report in SharePoint integrated mode.这个核查过后,也可以排除。

 

至此,由于第一次遇到这个错误,搜索了大量资料也没有看到一个很明确的答案,加之SSRS确实也是问题多多。所以我觉得应该是SSRS服务崩溃了。如有不对,敬请指出。

  

相关实践学习
使用SQL语句管理索引
本次实验主要介绍如何在RDS-SQLServer数据库中,使用SQL语句管理索引。
SQL Server on Linux入门教程
SQL Server数据库一直只提供Windows下的版本。2016年微软宣布推出可运行在Linux系统下的SQL Server数据库,该版本目前还是早期预览版本。本课程主要介绍SQLServer On Linux的基本知识。 相关的阿里云产品:云数据库RDS SQL Server版 RDS SQL Server不仅拥有高可用架构和任意时间点的数据恢复功能,强力支撑各种企业应用,同时也包含了微软的License费用,减少额外支出。 了解产品详情: https://www.aliyun.com/product/rds/sqlserver
相关文章
|
7月前
curl --retry 5 --retry-delay 2 -o curl 超时与重试
curl --retry 5 --retry-delay 2 -o curl 超时与重试
60 0
|
7月前
|
测试技术
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
251 0
|
SQL druid 关系型数据库
MySQL连接超时时间wait_timeout导致间歇性报错:communication link failure
MySQL连接超时时间wait_timeout导致间歇性报错:communication link failure
820 1
sls报错:m_idle_streams_timeout=10s, call invalid_srt
sls报错:m_idle_streams_timeout=10s, call invalid_srt
81 0
sls报错:m_idle_streams_timeout=10s, call invalid_srt
PG14中的idle_session_timeout
PG14中的idle_session_timeout
141 0
|
网络安全
Jmeter系列(44)- 详解 Elapsed time、Latency、Connect Time的含义
Jmeter系列(44)- 详解 Elapsed time、Latency、Connect Time的含义
354 0
|
网络协议
TCP Provider The semaphore timeout period has expired
我们一数据库服务器上有个作业最近几天偶尔会遇到下面错误(敏感信息已做处理),主要是报“TCP Provider: The semaphore timeout period has expired. [SQLSTATE 07008] (Error 121)  OLE DB provider "SQLNCLI" for linked server "(null)" returned message "Communication link failure". [SQLSTATE 01000] (Error 7412).  The step failed.”。
2221 0
TCP Provider  The semaphore timeout period has expired
|
SQL Java 关系型数据库
MySQL之wait_timeout和interactive_timeout参数
MySQL支持的最大连接数是有上限的,如果你的MySQL Server有大量的闲置连接,不仅会白白消耗内存,而且如果连接一直在累加而不断开,最终会达到MySQL Server的连接上限数,报‘to many connections’错误。
4921 0
|
关系型数据库 MySQL 数据库
interactive_timeout和wait_timeout的关系
interactive_timeout = 28800 wait_timeout = 28800 #这两个参数默认都是28800s,即8个小时; interactive_timeout指的是mysql在关闭一个交互的连接之前所要等待的秒数 wait_timeout指的是mysql在关闭一个非交互的连接之前所要等待的秒数 通过mysql客户端连接数据库是交互式连接,通过jdbc连接数据库是非交互式连接 (1)session级别修改interactive_timeout=10,wait_timeout默认不变。
2270 0