JustAMartin
JustAMartin

Reputation: 13733

SSRS crashes with OutOfMemoryExceptions when exporting large reports

We have SSRS reports for SQL 2012 Express. We need to export the reports in OPENXML format. There is a C# console application which passes the needed parameters to the SSRS, retrieves the exported report and saves it to a file. Our reports have some parameters which are not known until it is time to generate the report.

The report is exported using HttpWebRequest. Everything works just fine when we have medium-sized reports with about 50,000 rows. But when we have reports with 500,000 rows, eportingServicesService.exe starts consuming all the RAM available on the server, and SSRS often crashes with OutOfMemory exception. We also tried ReportServer component to export the reports, but this does not make any difference.

Is there any way to tell the SSRS that it should not try to generate the entire report at once but send it in chunks or stream it through the HttpWebResponse? The resulting file is just about 40MB, so it is really unclear to me why SSRS service is using more than 500MB of RAM and 100% CPU while generating this report.

Upvotes: 0

Views: 1039

Answers (1)

Victor Bustos
Victor Bustos

Reputation: 37

I had the same problem with SSRS Exporting to Excel 300000 rows; in my case the solution was build one clr store procedure in the sql server and invoke this within my web application.

Upvotes: 2

Related Questions