OutOfMemory Exception while syncing pages

Naresh Ede asked on March 23, 2020 13:18

Hello All,

I have a page in CMS and 10 attachments for the page, each of 6MB. So totally 60MB attchments for the page.

When I am syncing page from staging application, I am getting "System.OutOfMemory" exception.

I have increased the Content and request size in both source and target servers (refer code below) but still getting the error. Is there a way to sync the pages succesfully.

 <location path="CMSPages/Staging">
<system.web>
  <httpRuntime executionTimeout="4800" maxRequestLength="2097151" />
</system.web>
<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="2147483648" />
    </requestFiltering>
  </security>
</system.webServer>

Thanks,

Naresh Ede.

Recent Answers


Peter Mogilnitski answered on March 23, 2020 13:58

I assume you following the documentation. Did you do your changes on the target server?

0 votesVote for this answer Mark as a Correct answer

Naresh Ede answered on March 23, 2020 15:37

Yes, did in both source and target servers.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 23, 2020 19:26

What are the resources on each server? Could be your servers do not have the proper resources allocated. 4GB is not enough memory on a server for a Kentico website. It may get you by but you'll find out it won't work later on when your features stop working.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on March 24, 2020 10:54

I would try setting the limits on the global level, not only for staging since the attachments can be placed on disk sometimes, so you would need to define all the locations. Please see these articles: Tips for Uploading and Staging Large Files and Request limits.
Then, check what is the memory usage on both sides when staging. Maybe there is really not enough memnory available for the applications.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.