SSRS Memory issue

  • Hello,
    I have SSRS installed on an r4.2XL (AWS) node (64 GB x 8 CPU).  We have developed a Report Generation service which runs queued report requests from our main platform application.  A single request can contain upwards of 10,000 reports.  This service is set to run 2 threads with each serving 12 rendering requests. 

    This all has been working fine and dandy.

    Until now.

    With a new product several new reports have additional complexity and now, when both threads are running, I am getting 'System.OutOfMemoryException' errors.  If I run the request single threaded, it completes.  While running both threads memory usage on the node never goes above 15 GB (of a 64 GB total)  I do not have the WorkingSetMaximum or WorkingSetMinimum values set so all of the system memory is available to SSRS.  SSRS and our service are the only applications running on the server.

    I have tried giving huge (relatively) values to WorkingSetMaximum and have adjusted MemorySafetyMargin  and  MemoryThreshold values to give more space for high memory pressure scenarios, but still receive the memory error.

    Suggestions?
    TIA

  • Davis H - Thursday, February 8, 2018 10:54 AM

    Hello,
    I have SSRS installed on an r4.2XL (AWS) node (64 GB x 8 CPU).  We have developed a Report Generation service which runs queued report requests from our main platform application.  A single request can contain upwards of 10,000 reports.  This service is set to run 2 threads with each serving 12 rendering requests. 

    This all has been working fine and dandy.

    Until now.

    With a new product several new reports have additional complexity and now, when both threads are running, I am getting 'System.OutOfMemoryException' errors.  If I run the request single threaded, it completes.  While running both threads memory usage on the node never goes above 15 GB (of a 64 GB total)  I do not have the WorkingSetMaximum or WorkingSetMinimum values set so all of the system memory is available to SSRS.  SSRS and our service are the only applications running on the server.

    I have tried giving huge (relatively) values to WorkingSetMaximum and have adjusted MemorySafetyMargin  and  MemoryThreshold values to give more space for high memory pressure scenarios, but still receive the memory error.

    Suggestions?
    TIA

    You may want to try to determine at what point in the report process you are running out of memory. I've typically seen that addressed depending on if you are running out of memory during execution or during rendering. You can probably get an idea by checking which part of the process is taking the most time by querying the ExecutionLog view. The AdditionalInfo column will also give you an estimate of memory usage for pagination as well as processing.
    To get an idea of different approaches based on where the problem lies, you can refer to this KB article - it's old but the general approach for workarounds is still valid:
    You may receive the "System.OutOfMemoryException" error message when you use SQL Server Reporting Services

    Sue

  • Davis H - Thursday, February 8, 2018 10:54 AM

    Hello,
    I have SSRS installed on an r4.2XL (AWS) node (64 GB x 8 CPU).  We have developed a Report Generation service which runs queued report requests from our main platform application.  A single request can contain upwards of 10,000 reports.  This service is set to run 2 threads with each serving 12 rendering requests. 

    This all has been working fine and dandy.

    Until now.

    With a new product several new reports have additional complexity and now, when both threads are running, I am getting 'System.OutOfMemoryException' errors.  If I run the request single threaded, it completes.  While running both threads memory usage on the node never goes above 15 GB (of a 64 GB total)  I do not have the WorkingSetMaximum or WorkingSetMinimum values set so all of the system memory is available to SSRS.  SSRS and our service are the only applications running on the server.

    I have tried giving huge (relatively) values to WorkingSetMaximum and have adjusted MemorySafetyMargin  and  MemoryThreshold values to give more space for high memory pressure scenarios, but still receive the memory error.

    Suggestions?
    TIA

    Please specify your main memory of your server, Out of that how much m/y was given to SSRS. Please check the Report config file and look for

    Working set Maximim
    Memory Safety Margin
    Memory Threshold

    Please increase working set to maximum value and try to increase the RAM of your server, then assign the more m/y to SSRS to consume.

    Please edit the report config file for these settings and Take a back up first.

  • Thank you to those who have replied.
    I forgot to mention this is 2016 version.
    Subramaniam, I think if you re-read my original post, you will find the answers to your questions.  The WorkingSetMaximum is not in the config file by default but needs to be added if the server is running additional applications besides SSRS.  In this configuration, SSRS has all of the available memory to utilize, which, in my case, is over 50 GB.  As mentioned, I did set the WorkingSetMaximum to 50 GB and still am receiving the same error.  I set the MemorySafetyMargin to 80 and the MemoryThreshold to 50 to give more resource if the process moves into a high memory pressure scenario, which I would assume by the nature of the error, is. 

    I am currently working with my report designer to lessen the complexity.  I'll let you know how that goes.

  • Davis H - Friday, February 9, 2018 9:37 AM

    Thank you to those who have replied.
    I forgot to mention this is 2016 version.
    Subramaniam, I think if you re-read my original post, you will find the answers to your questions.  The WorkingSetMaximum is not in the config file by default but needs to be added if the server is running additional applications besides SSRS.  In this configuration, SSRS has all of the available memory to utilize, which, in my case, is over 50 GB.  As mentioned, I did set the WorkingSetMaximum to 50 GB and still am receiving the same error.  I set the MemorySafetyMargin to 80 and the MemoryThreshold to 50 to give more resource if the process moves into a high memory pressure scenario, which I would assume by the nature of the error, is. 

    I am currently working with my report designer to lessen the complexity.  I'll let you know how that goes.

    Please do post back. Curious as to what changes you see in the Execution log compared to the earlier executions.
    That is one workaround that often corrects the issue you see - just add that extra piece to the query and it pushes it over the edge. But nice job of tweaking with the memory settings earlier. Something not understood by too many 🙂

    Sue

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply