• 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