SQL Server – Reporting Services – Error – “Invalid or Expired Session”

Background

Reviewing collected “Extended Events” and noticed a recurring error.

Error

Image

Tabulated

  1. Message :- Invalid or Expired Session: [session id]
  2. Event Name :- error_reported
  3. Error Number :- 50000
  4. Severity :- 16
  5. session_server_principal_name :- Web Site’s Application Pool Identity
  6. server_principal_name :-
  7. is_system :- false
  8. database name :- ReportServer
  9. client_app_name :- Report Server

TroubleShooting

Database

ReportServerTempDB

Table

ReportServerTempDB.dbo.SessionData
Reviewing date of entries
Reviewing date of entries – SQL

SELECT

        [ExpirationMin] 
		  = min 
				(
					[Expiration]
				)
      
      , [ExpirationMax] 
		= max 
			(
				[Expiration]
			)
      
      , [durationBetweenMinAndMax]
			= datediff
				(
					  minute
					, min ([Expiration])
					, max ([Expiration]) 
				)

      , [durationBetweenMinAndCurrent] 
		  = datediff
				(
					  minute
					, min ([Expiration])
					, getdate() 
				)

      , [durationBetweenMaxAndCurrent] 
		= datediff
			(
				  minute
				, max ([Expiration])
				, getdate() 
			)

FROM [dbo].[SessionData] tblSD


Explanation
  1. The entries returned will have duration reflecting the settings set for session recycling.

Remediate

Configuration

Configuration Files

rsreportserver.config

Item :- Configuration \ CleanupCycleMinutes
Default

The default setting for CleanupCycleMinutes is 10.

This translates to entries in the ReportServerTempDB been pruned every 10 minutes.

Revised

Please increase timeout.

Doing so will mean that records are recycled less frequently.

Image – Default

 

Image – Revised

Explanation

Change CleanupCycleMinutes from 10 minutes to 180 minutes, 3 hours.

One thought on “SQL Server – Reporting Services – Error – “Invalid or Expired Session”

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s