SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSRS Memory issue


SSRS Memory issue

Author
Message
Davis H
Davis H
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 332
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

Sue_H
Sue_H
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: General Forum Members
Points: 36320 Visits: 10377
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



Subramaniam Chandrasekar
Subramaniam Chandrasekar
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1031 Visits: 387
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.

Davis H
Davis H
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 332
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.

Sue_H
Sue_H
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: General Forum Members
Points: 36320 Visits: 10377
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 Smile

Sue



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search