May 1, 2017 at 6:01 pm
I wrote a python program to bulk download ssrs reports.
The program sends a url to the browser to download an SSRS report, which it then renames and moves to specified directory for each key in a dictionary holding parameter values for the report.
For the parameters I've been testing each time I run my program I hit the same SSRS report 63 times.
The problem is that during development, I notice that after a while SSRS stops responding with the error
"The report server execution yhsoj1vs4bjdyqn4c4nw4k55 has expired or cannot be found. (rsExecutionNotFound)".
Then I cannot even manually run the report. The problem usually resolves itself within an hour but how do I prevent this from happening?
May 1, 2017 at 7:32 pm
Courtney12345 - Monday, May 1, 2017 6:01 PMI wrote a python program to bulk download ssrs reports.
The program sends a url to the browser to download an SSRS report, which it then renames and moves to specified directory for each key in a dictionary holding parameter values for the report.
For the parameters I've been testing each time I run my program I hit the same SSRS report 63 times.
The problem is that during development, I notice that after a while SSRS stops responding with the error
"The report server execution yhsoj1vs4bjdyqn4c4nw4k55 has expired or cannot be found. (rsExecutionNotFound)".
Then I cannot even manually run the report. The problem usually resolves itself within an hour but how do I prevent this from happening?
It could be the parameters or it could be session timeout or it could be just draining too much of the memory. Is that how it's going to run in production - you hit the same report 63 times? And is that just continually hitting that report? When it stops responding "after awhile" its that with breaks or continually hitting the report?
Have you looked in the Reporting Services log as well as the execution log view in the ReportServer database for other issues, errors when this happens?
Sue
May 1, 2017 at 8:02 pm
Sue_H - Monday, May 1, 2017 7:32 PMCourtney12345 - Monday, May 1, 2017 6:01 PMI wrote a python program to bulk download ssrs reports.
The program sends a url to the browser to download an SSRS report, which it then renames and moves to specified directory for each key in a dictionary holding parameter values for the report.
For the parameters I've been testing each time I run my program I hit the same SSRS report 63 times.
The problem is that during development, I notice that after a while SSRS stops responding with the error
"The report server execution yhsoj1vs4bjdyqn4c4nw4k55 has expired or cannot be found. (rsExecutionNotFound)".
Then I cannot even manually run the report. The problem usually resolves itself within an hour but how do I prevent this from happening?It could be the parameters or it could be session timeout or it could be just draining too much of the memory. Is that how it's going to run in production - you hit the same report 63 times? And is that just continually hitting that report? When it stops responding "after awhile" its that with breaks or continually hitting the report?
Have you looked in the Reporting Services log as well as the execution log view in the ReportServer database for other issues, errors when this happens?Sue
I don't think the parameters that I am passing is the issue because I can pass those same parameters when the report is working without a problem. And the report normally renders very quickly (generally under 5 seconds) since it is based on a very simple query. In production we will need to hit the same report 63 times because as far as I am aware SSRS doesn't have an option to run the same report with multiple parameter selection but to download as distinct files with customized file names on demand. When I say the server "stops responding after a while" I mean that I run my program during development several times successfully but after the 6th or 7th or 10th run for example when I visit the url, I see the "rsExecutionNotFound" error. The number of times I can run my program before the report server stops responding varies. It has stopped responding after just 2 runs, but sometimes I can run my program 20 times before the server stops responding. I checked the Reporting Services log as well as the execution log view in the ReportServer database and nothing seems out of the ordinary.
May 2, 2017 at 9:08 am
If the only error is rsExecutionNotFound that could be different than the "report server execution xxxx has expired or cannot be found". I'm guessing you just shortened things - it is a pain to type of the full error message.
Either way, it will be in the Reporting services log which would give you more information. And there is some information in the Execution Log views to help you track things down. You just need to know what to look at. You could increase timeout values but that can also have some side effects. I would probably want to monitor that session and see if it actually hit a timeout.
When/if you get the error, report server execution xxxx has expired, check for that xxx value in the ReportServerTempDB database in the SessionData table. That is the SessionID. That can be correlated back to the ExecutionLog3 and the ExecutionID.
Just from there you can find a lot of what is going on. Are you using the same sessionid on each hit to the report or different ones on each request. Normally it's different sessionids but in some scenarios you can be using the same one each time. So if that runs over the session timeout periods, that would explain things.
Did you really hit a timeout with that sessionid? You can tell by the first start time in the Executionlog view or you get more details if the sessionid is still in the SessionData table in ReportServerTempDB. So you can tell a lot by just checking these things.
And you can find the timeout values if you query the ConfigurationInfo table.
At at the system level, the SystemReportTimeout is the same as what you have if you go to the Report Manager URL, go to site settings and the general page on the right has the Report Timeout Settings.
At the session level, you have session timeout and SessionAccess Timeout (usually depends on what version of SSRS for the Session Access value). These are in the properties for SSRS in SSMS if you connect to the ReportServer, on the server name do properties and go to advanced.
At this point, if you don't have a good idea or want to test the different settings, the easiest one would be the Site Settings and just set the Report Timeout to Do Not Timeout. And see if you get the error.
I can't tell how you are actually running your program to test but I would first guess it's a session timeout setting. In the SSRS server properties in SSMS, I would increase that to something more than 10 mins which is the default 600 secs. You don't want to go overboard with that since it can increase the time things are left in the ReportServerTempDB and consequently affect the size. The SessionAccessTimeout should be a different error in the Reporting Services log - I think the timeout shows up with a call to GetSessionData, can't remember for sure. But I would guess that's not the issue.
All of that should give you enough info to check into what's going on and change whatever timeout values you may need to change. Hope that helps - please post back on if you get it resolved or still have problems or questions.
Sue
May 2, 2017 at 9:33 am
Sue_H - Tuesday, May 2, 2017 9:08 AMIf the only error is rsExecutionNotFound that could be different than the "report server execution xxxx has expired or cannot be found". I'm guessing you just shortened things - it is a pain to type of the full error message.
Either way, it will be in the Reporting services log which would give you more information. And there is some information in the Execution Log views to help you track things down. You just need to know what to look at. You could increase timeout values but that can also have some side effects. I would probably want to monitor that session and see if it actually hit a timeout.
When/if you get the error, report server execution xxxx has expired, check for that xxx value in the ReportServerTempDB database in the SessionData table. That is the SessionID. That can be correlated back to the ExecutionLog3 and the ExecutionID.
Just from there you can find a lot of what is going on. Are you using the same sessionid on each hit to the report or different ones on each request. Normally it's different sessionids but in some scenarios you can be using the same one each time. So if that runs over the session timeout periods, that would explain things.
Did you really hit a timeout with that sessionid? You can tell by the first start time in the Executionlog view or you get more details if the sessionid is still in the SessionData table in ReportServerTempDB. So you can tell a lot by just checking these things.And you can find the timeout values if you query the ConfigurationInfo table.
At at the system level, the SystemReportTimeout is the same as what you have if you go to the Report Manager URL, go to site settings and the general page on the right has the Report Timeout Settings.
At the session level, you have session timeout and SessionAccess Timeout (usually depends on what version of SSRS for the Session Access value). These are in the properties for SSRS in SSMS if you connect to the ReportServer, on the server name do properties and go to advanced.At this point, if you don't have a good idea or want to test the different settings, the easiest one would be the Site Settings and just set the Report Timeout to Do Not Timeout. And see if you get the error.
I can't tell how you are actually running your program to test but I would first guess it's a session timeout setting. In the SSRS server properties in SSMS, I would increase that to something more than 10 mins which is the default 600 secs. You don't want to go overboard with that since it can increase the time things are left in the ReportServerTempDB and consequently affect the size. The SessionAccessTimeout should be a different error in the Reporting Services log - I think the timeout shows up with a call to GetSessionData, can't remember for sure. But I would guess that's not the issue.All of that should give you enough info to check into what's going on and change whatever timeout values you may need to change. Hope that helps - please post back on if you get it resolved or still have problems or questions.
Sue
I double-checked in the SessionData table in ReportServerTempDB, for each time my program runs the report a distinct SessionID is used, so I don't think it is a timeout issue, unless I am overlooking something?
Here is the full error from the reporting services log:
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.;
ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ExecutionNotFoundException: , Microsoft.ReportingServices.Diagnostics.Utilities.ExecutionNotFoundException: The report execution yhsoj1vs4bjdyqn4c4nw4k55 has expired or cannot be found.;
These are the 2 error I see when the report stops responding.
At this point we think it as a memory issue. We are thinking of just letting the people who will eventually be running my program to due so at off hours.
Thank you for all your help Sue!
December 14, 2017 at 1:02 pm
I have just encountered a similar error and symptoms after deploying Power BI Report Server October 2017 GA on a SQL Server 2016 Enterprise server. I had been running SSRS 2016 (and multiple versions before that) without issue. The same URL and report have been working for years, so the only known change was PBIRS. The error was occurring when clicking a URL link in a web page to run an SSRS/paginated report and generate it as a PDF so the user can save it to disk. Based on other posts I found, I added "&rs:ClearSession=True" to the URL and it worked immediately just by refreshing the web page containing the URL (no server-side resets). I've had to use that parameter before with SSRS reports embedded in an iFrame.
J Pratt
January 28, 2020 at 2:42 pm
We use the ReportViewer control on a custom .aspx page for running reports and "randomly" get the rsExecutionNotFound error; just rerun the report and try to export to PDF and it will work fine. Since we're not using URL access, is there another way around the "&rs:ClearSession=True" query parameter?
Also... would love it if you could share your python script! That would be an extremely helpful utility...
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply