Wednesday, March 21, 2012

Report times out on Export after 90 seconds.

I have a report that is timing out after 90 seconds of run-time - but only
when exporting to an alternate file type (PDF, XLS, etc)- if I use the HTML
Viewer format, the report is displayed properly and only takes a couple of
seconds to run. The error message that I get back says "The operation has
timed-out", and I'll include the stack trace at the end of this message.
My application is calling the ReportingService.Render method using SOAP
Reporting Services Web Service to perform the export to a PDF format. I'm
able to see the same problem when using the Report manager to export the
report to PDF format. This report definition is using a table to display the
query results (no matrices), and is printing in landscape mode. I have RS
Service Pack 2 installed on the server.
The report is running off of a fairly small data set (4000-5000 records),
with a couple of tricky joins, but I can execute the query using SQL Server
Enterprise Manager in about 2 seconds. I have tried setting the data set
'Timeout' value to 3600 (1 hr) and 2147483647 (documentation named maximum
value) in the Report Designer for the .rdl itself (timeout element under
query element in rdl). I've tried setting "Connect Timeout=3600" in the
connection string for my Data Set defined on the Report Server. I have also
set the Report Server to not timeout report execution both in Site Settings
and the individual settings for the submitted report definition. What
timeout am I missing?
If I trim down my data set to under 1000 records, the Render call completes
before the timeout can occur, and I get my PDF. I've spent some time trying
to figure out what's going on, and am at a loss. Here's what I see happening
over time:
0:00 - Submit report - Render() call is made
0:05 - CPU Utilization on server jumps to 100%, I can see report job in
Report Manager
1:30 - I get error message back from Render() call saying "The operation has
timed-out."
2:35 - CPU utilization on server slows back down to normal, job is no longer
visible in Report Manager
Any help or suggestions greatly appreciated!With this same report, trying different export formats - this is what I've
found:
PDF - times out after 90 seconds
XLS - times out after 90 seconds.
TIF - times out after 90 seconds.
CSV - results show up after ~ 10 seconds.
HTML - results show up after ~ 10 seconds.
XML - results show up after ~ 10 seconds.
So it looks like anything that doesn't end up in a plain text export is
timing out on me. And here's that stack trace I promised earlier:
The operation has timed-out.
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request) at
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest
request) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at UT.RSRef.ReportingService.Render(String
Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[]
Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
Warning[]& Warnings, String[]& StreamIds) in C:\Documents and Settings\Ben\My
Documents\Visual Studio Projects\REPOUTIL\Web
References\RSRef\Reference.cs:line 653 at UT.repoutil.Page_Load(Object
sender, EventArgs e) in c:\documents and settings\ben\my documents\visual
studio projects\repoutil\repoutil.cs:line 5209|||Ben,
Can you render other reports without timeouts? If they all time out, I
would say its somthing wrong with the export feature...
If its just this one report it might just be taking a long time to render if
the report is large, I believe you can change the timeout values in one of
the rsserver config files to allow you more time to either get your export,
or generate some other type of error that your not seeing now because of the
timeout.
Hope this helps in some way.
"Ben Shaffer" wrote:
> With this same report, trying different export formats - this is what I've
> found:
> PDF - times out after 90 seconds
> XLS - times out after 90 seconds.
> TIF - times out after 90 seconds.
> CSV - results show up after ~ 10 seconds.
> HTML - results show up after ~ 10 seconds.
> XML - results show up after ~ 10 seconds.
> So it looks like anything that doesn't end up in a plain text export is
> timing out on me. And here's that stack trace I promised earlier:
> The operation has timed-out.
> at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
> request) at
> System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest
> request) at
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters) at UT.RSRef.ReportingService.Render(String
> Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[]
> Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
> String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
> Warning[]& Warnings, String[]& StreamIds) in C:\Documents and Settings\Ben\My
> Documents\Visual Studio Projects\REPOUTIL\Web
> References\RSRef\Reference.cs:line 653 at UT.repoutil.Page_Load(Object
> sender, EventArgs e) in c:\documents and settings\ben\my documents\visual
> studio projects\repoutil\repoutil.cs:line 5209
>|||Thanks Jason,
It's only one report that is giving me this headache. I have dozens more
that export before the timeout.
Can you point me towards any documentation on what the reportserver config
files are and what the settings do? I've found various *.config files in the
report server directories on the server, but haven't seen any keys that jump
out at me as being the right one for the timeout that's giving me grief.
"Jason Brinkley" wrote:
> Ben,
> Can you render other reports without timeouts? If they all time out, I
> would say its somthing wrong with the export feature...
> If its just this one report it might just be taking a long time to render if
> the report is large, I believe you can change the timeout values in one of
> the rsserver config files to allow you more time to either get your export,
> or generate some other type of error that your not seeing now because of the
> timeout.
> Hope this helps in some way.

No comments:

Post a Comment