Error: Exception of type "System.OutOfMemoryException" was thrown. Server memory completely consumed by downloading an export file."

When a large Export file is downloaded this causes most or all available memory to be consumed on the server. All users may see poor performance in CRM and BBIS and may receive the error "Exception of type "System.OutOfMemoryException" was thrown.
Download and install the latest patch, which contains all fixes from previous patches. If you are running an older version, download and install the latest version and then the patch. 
As a temporary work around, there is a configuration that can be added to the web.config file that will reduce the impact ONLY when downloading CSV. XSLX files remain impacting.
If you are hosted, please ask Support to make this change, and refer to this article.
If you are not hosted, please add the following to the "<AppSettings>" section of the CRM "web.config" file on the application server:

<add key="FileDownloadBufferSize" value="5120" />

This may impact the speed of download, and in the case of an extremely large file, you may risk file truncation. Until this is resolved it is recommended that a large export (resulting in files over 100MB) be broken into smaller exports where possible, and always downloaded as a CSV.. 
As with all changes, please test thoroughly in a non-live environment first.


 3.0.516.61 ;

Was this article helpful?

Thanks for your feedback! Did this solve your issue?

Comments (optional):

Thanks for your feedback!
We're glad it was helpful but sorry it didn’t solve your issue. If you need assistance, click Chat with Support below.
We’re sorry to hear that. Please tell us why.

 I don't like how this works.

 The answer is confusing.

 The answer didn't match what I was searching for.

Additional Comments (optional):

Thanks for your feedback! If you need assistance, click Chat with Support below.
Thanks for your feedback. Help us make our products even better by sharing details in our Idea Banks or our online Community.
Thanks for letting us know. We'll work on clarifying the information in the article. If you need assistance, click Chat with Support below.
Thanks for letting us know. We'll work on updating the search engine to return more relevant results.