1

We have been building reports for SSRS 2016. Reports that execute in under 2 minutes work fine. However, we have some remotes that need well over 10 minutes.

However, when executing the report it times out after about 2 minutes and returns this error:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred 
while processing the request on the server. 
The status code returned from the server was: 502

I tried setting the execution timeout in web.config

<httpRuntime executionTimeout="2147472000" maxRequestLength="2147483647" />

I also tried setting the ScriptManager's timeout:

ScriptManager scriptMan = ScriptManager.GetCurrent(this);
scriptMan.AsyncPostBackTimeout = 10800;

Unfortunately, none of that solved the issue. Any help would be appreciaated. Thanks guys.

Althaf PJ
  • 15
  • 4

2 Answers2

0

There are several different timeouts in play when you run a report including the viewer control, the report server, and your source database. Keep in mind that waiting over 10 minutes each time you want to run a report is not an ideal experience.

Instead, I would suggest looking into caching the report on a schedule. You can set this up in the report processing options on your report server. You can choose to have the cache refresh once a day for example. This way, when a user decides to run the report, it will load much faster.

Reports do not have the same timeout limitations when refreshing a cache. And since the cached report renders more quickly, you don't have to adjust any timeout settings. This also provides a better user experience.

StevenWhite
  • 5,907
  • 3
  • 21
  • 46
0

In our case, when we received the 502 error while running the SSRS report, we also receive the following error in the log file:

Failed allocate pages: FAIL_PAGE_ALLOCATION 2

(logfile: C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\LogFiles\ReportServerService__.log)

This indicates insufficient memory allocated to the SSRS Service. The allocated memory can be configured in the rsreportserver.config file, by setting the WorkingSetMaximum variable.

So I suggest, when you receive the 502 error, it is worth checking the logfiles for the FAIL_PAGE_ALLOCATION error.

Milo
  • 3,365
  • 9
  • 30
  • 44