Try our conversational search powered by Generative AI!

Magnus Rahl
Apr 30, 2018
  3585
(7 votes)

ASP.NET Cache memory bug fixes released

Fixes for two bugs I found in ASP.NET Cache memory management are included in .NET Framework 4.7.2 which was released today (download here). The two bugs would under most conditions allow the ASP.NET Runtime Cache, used heavily in Episerver applications, to use up almost all memory. In Azure Web Apps (and therefore in DXC Service) this would in turn cause unnecessary application recycles because of how the Proactive Auto Heal feature (enabled by default) reacts to high memory usage. You can read more in my previous blog post.

While you can download and install the update today on servers you control yourself, it will be some more time before the update is desployed where it is needed the most, on Azure Web Apps. There is no definitive time table for this, but there is a github announcement and discussion. A possible estimate might be drawn from the previous deployment: .NET Framework 4.7.1 was released 2017-10-17 (source), Azure deployments started around 2017-12-04 (source) and were complete by 2018-01-05 (source).

In the meantime I strongly advice sites to continue to use the workaround (explained in my previous blog post) of setting the cache's privateBytesPollTime setting to 29 seconds and explicitly configure a percentagePhysicalMemoryUsedLimit, 90 % or below to stay clear of Proactive Auto Heal, e.g.

<cache percentagePhysicalMemoryUsedLimit="80" privateBytesPollTime="00:00:29" />

Update 2018-05-01

If possible, also consider updating to CMS 11.1 or later. From that verison, a much shorter cache timeout is used for items inserted through scheduled jobs. There is also a new API making it possible to control the Content cache timeout for a specific call, e.g. when doing a batch read of large amounts of content that you don't expect to be accessed very often.

For any CMS version, you can also consider configuring the pageCacheSlidingExpiration option of the episerver config section. The default for this option is 12 hours, which considering it is a sliding expiration, is probably overkill for most applications.

Apr 30, 2018

Comments

Aria Zanganeh
Aria Zanganeh May 1, 2018 12:15 AM

This is really awesome. We were waiting for this :) 

Magnus Rahl
Magnus Rahl Aug 9, 2018 08:09 AM

.NET Framework 4.7.2 is now scheduled to roll out on Azure Web Apps during September: https://azure.microsoft.com/en-us/updates/net-framework-4-7-2-update-coming-to-azure-app-service-apps/

Please login to comment.
Latest blogs
Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog

The A/A Test: What You Need to Know

Sure, we all know what an A/B test can do. But what is an A/A test? How is it different? With an A/B test, we know that we can take a webpage (our...

Lindsey Rogers | Apr 15, 2024

.Net Core Timezone ID's Windows vs Linux

Hey all, First post here and I would like to talk about Timezone ID's and How Windows and Linux systems use different IDs. We currently run a .NET...

sheider | Apr 15, 2024