Timeouts and Microsoft SQL Server 2005 Reporting Services

When working with Microsoft SQL Server 2005 Reporting Services, there are more levels of execution\session timeout configurations. On one hand we have the ASP.NET session which we have to consider since the SSRS service is actually a ASP.NET Web Service. But then we have also an SSRS “user session”. This has nothing to do with the ASP.NET ‘s session and it’s completely different. SSRS's session contains data related to the report currently executed by a user, the data used in the report, the report state, parameter state, etc...

When we encounter errors like: "ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ExecutionNotFoundException: Execution 'n3uh3355xsgfrajxklix1m55' cannot be found" in the SSRS logs, these are related to the SSRS session.

Here below are the configuration options we have in terms of timeout control.

IIS\ASP.NET related:
- executionTimeout - https://msdn.microsoft.com/en-us/library/ms824641.aspx  - in web.config for ReportServer. This is the maximum amount of time that it takes to process a SOAP message using the TCP protocol.
- Idle Timeout option on the Performance tab in the Application Pool used by Reporting Services in IIS Manager.

SSRS related:

- RecycleTime element in RSReportServer.config – this specifies the recycling period for the entire Application (SSRS Web Service). The default is 720 – in minutes.
- DatabaseQueryTimeout element in RSReportServer.config – Specifies the number of seconds after which a connection to the report server database times out. This value is passed to the System.Data.SQLClient.SQLCommand.CommandTimeout property. Valid values range from 0 to maximum integer. The default is 120. Setting the value to 0 is not recommended; it specifies an unlimited wait time. This is affecting DataSet queries inside the report.
- The SessionTimeout and SessionAccessTimeout system properties. These are the settings controlling the SSRS user session I mentioned in the beginning. The default value for these is 10 minutes, expressed in seconds (600). One could see the SessionTimeout value in the ConfigurationInfo table in the ReportServer database. To modify these system properties’ values you could use a simple script designed for RS.EXE like the one below:

Public Sub Main()
    Dim props() as [Property]
    props = new [Property] () { new [Property](), new [Property]() }
   
    props(0).Name = "SessionTimeout"
    props(0).Value = 3600
   
    props(1).Name = "SessionAccessTimeout"
    props(1).Value = 3600
   
    rs.SetSystemProperties(props)
End Sub

This sample will set the values to 3600 seconds which is too much in most situations. You would need to adjust these values to suit your needs.
For more information about this subject: https://blogs.msdn.com/jgalla/archive/2006/10/11/session-timeout-during-execution.aspx

---

Emi