SSRS webpage error 500 and 504

Gnandeep 1 Reputation point
2020-10-20T10:10:14.347+00:00

Hi all,

We have been facing intermittent issue with few ssrs reports where users are getting 500 or 504 error.

Below are the error messages for 500/504
"Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"

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

No logs recorded on the LogFiles
Few times its not recorded on Execution Log tables as well, but when its recorded it will record as status "rsProcessingAborted"

User Browsers: Chrome, Firefox, Edge
User OS: Mac, Windows
Report Dataset : Store Procedures
SQL Server : 2016
Web config time out check : 9000 seconds
Report Time out on Report Ma : 9000 seconds
Server Query Timeout/Report Server : 3600 seconds

Bit puzzled where to look for. Any help would be great.

Thanks in advance
Gnandeep

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,065 questions
SQL Server | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,636 Reputation points
    2020-10-21T03:24:19.09+00:00

    Hi Gnandeep,
    @Gnandeep ,
    SSRS: webpage error status code 500
    This problem is being caused by SQL server stopping a report being run because the request lengeth exceeds a certain amount.

    The solution to this is as follows:
    Locate the web.config files for the ReportServer.
    It should be found somewhere like this:
    C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\ReportServer\web.config

    Once located you need to edit the web.config files and add the following bit of code:

    <appSettings>  
    <add key="aspnet:IgnoreFormActionAttribute" value="true" />  
    <add key="aspnet:MaxHttpCollectionKeys" value="100000" />  
    </appSettings>  
    

    These app settings should be added between /system.web and runtime nodes, so it should look something like the following:

    </system.web>  
    <appSettings>  
    <add key="aspnet:IgnoreFormActionAttribute" value="true" />  
    <add key="aspnet:MaxHttpCollectionKeys" value="100000" />  
    </appSettings>  
    <runtime>   
    

    SSRS: webpage error status code 504
    The 504 Gateway Timeout error is usually a network error between servers on the network or an issue with an actual server.
    This may also mean that the report server is down or not working properly.
    1.If you have manually configured the proxy , verify that Bypass proxy servers for local addresses is set to true.

    <system.net>  
        <defaultProxy>  
            <proxy bypassonlocal="True" usesystemdefault="False"/>  
        </defaultProxy>  
    </system.net>  
    

    2.Set the HttpRuntime ExecutionTimeout value to a greater value (ie 3 hours) on the Report Server. (Start -> Administrative Tools -> Internet Information Services)
    Find the HttpRuntime parameter in "Web.Config". If it does not exist, you must create it in the <System.Web> section.
    As shown below, set the executionTimeout value to "10800" (3 hours):

    <system.web>  
    <httpRuntime executeTimeout="10800" />  
    </system.web>  
    

    3.Increase the script timeout on the report server.
    a. Go onto your Reporting Server and open up Internet Information Services; right-click on the ReportServer and select Properties.
    b. Go to the Options tab, and set the ASP Script timeout to 300 seconds.

    4.Set the report to never time out on the server.
    a. Open your web browser on the server and go to http://localhost/Reports
    b. Navigate to the Report location and click on the problem report(s).
    c. On the left-hand pane, click on Properties.
    d. In the ‘Report Execution Timeout’ click the ‘Do not timeout report execution’.

    Hope this helps.
    Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Joyzhao-MSFT 15,636 Reputation points
    2020-10-23T06:12:19.907+00:00

    Hi Gnandeep,
    For your 1st concern, since 500 and 504 are quite general issue, so we do multiple test to try to find where is the main cause. But I noticed that your issue is intermittent , could this be network or other issue which trigger this ?

    Does changes to the config file are within the Microsoft support?

    Those config file are generally safe to change, and of course we need to know for sure the consequence. But we could change it back anytime. Make sure you back up them first.
    Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Brian Casteel 0 Reputation points
    2023-07-27T19:55:05.92+00:00

    I found this in the LogFiles dir while looking into the cause of my issue.

    appdomainmanager!DefaultDomain!b28!07/26/2023-17:32:13:: e ERROR: AppDomain ReportServer_SSRS_0 failed to start. Error: Access to the path 'D:\Program Files\Microsoft SQL Server Reporting Services\SSRS\ReportServer\RSTempFiles~AspAccessCheck_14cdc2eb2856.tmp' is denied.

    I had to add NetworkService to folder permissions for RSTempFiles in order to complete the process.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.