First, I understand that it is a terrible idea to run very large / lengthy reports. I know that Microsoft has a rule confirming that SSRS report requires no more than 30 seconds. However, sometimes gigantic reports are the preferred evil due to external forces consistent with state laws.
In my place of work, we have an asp.net (2.0) application that we have migrated from Crystal Reports to SSRS. Due to the large user base and the complex requirements for the reporting user interface, we have a set of screens that accept user-entered parameters and create schedules that will be executed during the night. Since the application supports several reporting frameworks, we do not use SSRS planning / snapshot tools. All reports in the system are generated by the planned console application, which accepts the parameters entered by the user and generates reports with the corresponding solutions for the reports with which the reports were created. In the case of SSRS reports, the console application generates SSRS reports and exports them as PDF files through the SSRS web services API.
So far, SSRS has been much easier to handle with anything besides Crystal, with the exception of the 25,000-page report we recently converted from Crystal reports to SSRS. SSRS Server is a 64-bit 2003 server with 32 gigabytes of RAM running SSRS 2005. All of our smaller reports work fantastically, but we are having problems with our larger reports, such as this one. Unfortunately, we cannot generate the above report through the web services API. The following error occurs after about 30-35 minutes during the generation / export process:
Exception message: The underlying connection was closed: An unexpected error occurred while receiving.
A web service call is what I'm sure you saw everything before:
data = rs.Render(this.ReportPath, this.ExportFormat, null, deviceInfo, selectedParameters, null, null, out encoding, out mimeType, out usedParameters, out warnings, out streamIds);
It is odd that this report will be launched / displayed / exported if the report is run directly on the report server using the report manager. The process that creates the data for the report runs for about 5 minutes. The report is displayed in native SSRS format in the browser / view after about 12 minutes. Exporting to pdf via a browser / viewer in Report Manager takes an additional 55 minutes. This works reliably and creates an amazing pdf file of 1.03gb size.
Here are some of the most obvious things I tried to get the report to work through the web services API:
- set the HttpRuntime ExecutionTimeout value to 3 hours in the server report
- disabled http keep alives on report server
- increased script latency on the report server
- set the report to never log on to the server
- set the report timeout for several hours when calling a client
From the settings I tried, I'm pretty comfortable saying that any problems with the timeout have been fixed.
Based on my research on the error message, I believe the web service API does not send responses by default. This means that he is trying to send all 1.3gb over the wire in one answer. At some point, IIS throws a towel. Unfortunately, the API abstracts the web services configuration, so I cannot find a way to enable the response response.
- Does anyone know in any case to reduce / optimize the PDF export phase and or PDF size without reducing the total number of pages?
- Is there a way to enable lock response for SSRS?
- Does anyone have any other theories about why this works on the server, but not through the API?
EDIT: After reading the kcrumley message, I started looking at the average page size, taking the file size / number of pages. Interestingly, in smaller reports, math works so that each page is approximately 5K. Interestingly, when the report gets larger, this βaverageβ increases. For example, an 8000-page report is an average of more than 40 K / pages. Very strange. I will also add that the number of entries per page is set with the exception of the last page in each group, so this is not the case when some pages have more entries than others.