Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS Report suddenly hanging

Have an SSRS I created in VS 2008. SQL server = 2008r2, authenticated login with my domain credentials.

The report I have has about 12 or so TableX controls on it with various queries to produce a summary report of activity.

Everything was fine when I left yesterday, however, when I came in this morning, the report just hangs when I click "preview" (or run the report in debugger). All I see is "report is being generated" and then I have to go into task manager and kill devenv.exe to recover from it.

Inside the report designer I've ran each query individually to verify that there are no "long running" queries and there arent. Each take about a second to return results. Other reports in the package run fine, just this one is an issue.

Is there someplace I can look or do I have to start deleting TableX's one by one to find the culprit (if thats even the problem).

Thanks

Frank

like image 531
user1426158 Avatar asked Dec 27 '22 00:12

user1426158


2 Answers

Time to put my comments into an answer (even though you've already tried some of 'em). You ask for methods to find out which part of a report is tripping up execution, here's my 2 cts.

First things you can try when you're stuck:

  • Restart Visual Studio (the good 'ole "have you tried turning it off and on again?")
  • Remove the .data files to force a refresh of the data being queried

If you want to dive a little deeper and have access to a true reportserver:

  • Deploy to a reporting server, and check the execution log

Some additional things that may help:

  • running the queries seperately in Visual Studio and/or in SSMS, preferably with the same parameter values as the ones tripping up the report (mentioning this for completeness, but the question already states this didn't resolve anything)
  • try to run the report against a recent backup of the database (if available), a recent change or increase in data may be the cause of your troubles
  • Review the RDL code, specifically the queries, and look for trouble :)
  • Include a TOP 10 or something similar in all your queries to find out which one is causing trouble.

Failing all that I think your best option is the one you already mention: find the offending tablix and query by process of elimination.

As a final thought, the two things that caused 99% of our performance problems in SSRS:

  1. Pivoting (so: tablix with dynamic columns) with lots of data and/or funky formatting/layouting expressions.
  2. Overuse of subreports.

Hope this was helpful to you or any future visitor. If not be sure to answer your own question here and tell us how you solved things in the end.

like image 63
Jeroen Avatar answered Jan 02 '23 02:01

Jeroen


While this question is years old, I found it when trying to figure out my own problem. Here's my solution, just in case it helps anyone else:

Close any instance of Server Management Studio connected to the database in question.

In my case, I had SSMS open and connected to the database server from another computer and had been testing some long-running stored procedures on the same database that my reports were trying to connect to. There must have been some lingering connection(s) that caused it to not respond, as after having the problem in SSRS I started getting timeouts for very simple queries in SSMS as well.

Once I closed SSMS and waited a moment my reports ran fine in SSRS.

like image 36
Kodithic Avatar answered Jan 02 '23 01:01

Kodithic