-
Notifications
You must be signed in to change notification settings - Fork 2.2k
outputcache max-age incorrect #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same issue occurring to a customer of mine. |
in our production env, we only uninstall 4.6.2 and install 4.6.1, and the issue not occur now. |
We are also getting this issue. |
The issue has been identified. We are not setting any more the _utcTimestampRequest value in HttpCachePolicy.ResetFromHttpCachePolicySettings In previous versions apparently we used to set it tot he actual timestamp of the inbound request. As a result, we are calling HttpCachePolicy.GetHeaders with a _utcTimestampRequest object with a dateData value set to 0. Hence when we do age = _utcTimestampRequest - _utcTimestampCreated; we get an absurd value such as the ones in the repro. I cannot think about any immediate code workaround since the issue appears to happen all within System.Web |
Just to provide an update on this: a fix is being tested and it is bound to be released with the 4.6.3 update or earlier. |
Is there already news on a date for the release of the fix? |
This issue is quite severe, we're about to release an application using asp.net mvc 4.6.2 |
Unfortunately, there are no updates on the official release date for the fix yet. This is still being tested and it's yet to agree on whether shipping this with 4.6.3 or earlier. Please note that the bug is affecting the way the max-age field is populated only. This can have an impact mainly for caches or CDNs that are reading the max-age attribute in order to manage the content freshness and distribution. Currently, the only recommended workaround is to downgrade to 4.6.1 by removing KB151864. If you are unable to, there might be one hack possible which would use reflection to change the internal private field _utcTimestampRequest and populate it with a proper TimeDate value. This should happen when the EndRequest event is called. This hasn't been tested and it is NOT RECOMMENDED. Further updates will be made available on this thread. |
Are the Azure people looped in? This is getting to be a big problem on there. |
This bug is very very very serious, please fix it ASAP, thanks! |
No, it is not only an issue for CDN:s. Behavior between Chrome and IE really isn't the same when it comes to caching. Now our application is for intranet usage only, so damage is limited if we release it with the cache bug, but would this be a public site that would seem superbad actually... |
Can't use CDN's with such bug. How to downgrade to 4.6.1 for Azure WebApp`s? |
Is there any progress on this one? |
This is critical! A bugfix should be released even before .Net 4.6.3 |
I am getting this exact same issue on a .Net 4.5.2 website hosted on Azure (IIS8). On first request On subsequent requests Dosent look like this is a 4.6.2 only issue... Any update on a fix..? Any advice..? |
@skimonkey it doesn't matter what version you target, it's still going to run using the current Azure .NET Framework version (4.6.2). |
/cc @glennc |
Seems to be fixed in 4.7, surely took some time https://github.com/Microsoft/dotnet/blob/master/releases/net47/dotnet47-changes.md#aspnet |
We discovered this at Stack Overflow as the root cause to many problems. This should absolutely be a hotfix to existing .NET 4.6.2 installs. For many .NET 4.7 will not be an option for some time, and this is a critical bug. I'm honestly shocked that this went unsolved for months, we would never had expected such a known issue to stay open for this long. So many people on 4.6.2 will not ever even realize this is the root cause of some of their issues. We didn't until it was too late. The cache poisoning downstream has already caused severe harm. As a result of this bug, we have tens of millions of downstream requests that are cached in proxies we don't control for over 2000 years. Only manual purges or volatile cache competition will purge them, which results in impossible to debug or remotely solve scenarios as our users report stale content. This is a huge, HUGE bug. It needs a fix for all ASAP. Though we're willing to deploy .NET 4.7 on a whim, very few people are in that position. They need a hotfix, ASAP. To work around this at all we have effectively disabled all |
@NickCraver - I couldn't agree more with you. This is really huge issue, and it`s disappointing that MS seems to not realizing it. I'm the (un)lucky one on Azure, anyone knows when 4.7 will be on Azure? |
Update on this issue:
Apologies that the fixes are not coming sooner. We're currently testing the 4.6.2 fix right now. We're working with @NickCraver to get some testing in his environment before going broader. @MichalGrzegorzak Will get back to you on when either 4.7 or this fix for 4.6.2 will be in Azure. |
@MichalGrzegorzak can you tell which Azure service you use? Azure app services deploys .NET Framework differently than Azure VMs, for example. |
Fix is coming, so closing. |
Few things are so out of your control as a cache you cannot purge as a developer. Maybe it would be time for MS to put some effort into writing serious unit tests that detect a problem like this before anything is released? |
Since I hit this several times when verifying changes, posting here:
|
For others ^ we've deployed this across the Stack Overflow web tiers and haven't found any ill effects. The issue is now resolved here. |
@richlander We are using WebApp's. Still can`t find information when Azure will be patched. Any idea? |
@NickCraver we encountered the same problem with our site(eCommerce) and customers were asking for special offers/sales that are no longer exists because they saw them online and we must provide it to them or else they may have a reason to sue us. This bug cost us a lot of money! |
a simple controller like below:
public class DetailController : Controller { [OutputCache(Duration = 300, VaryByParam = "id")] public ActionResult Index(int id) { return View(); } }
and the view
<title>Index</title>`@{
Layout = null;
}
when i first request the url http://localhost:80/Detail/Index?id=3, the max-age in response headers is correct (max-age=300), then i refresh the page (ctrl + f5), the respones state is 304, but the max-age in response headers is incorrect (max-age=63613066544) , and this cause the url link click request read the response from the browser's disk cache ( 200 ok from disk cache).
the issue only happen in .net framework 4.6.2, not happen in 4.6.1 or early version.
The text was updated successfully, but these errors were encountered: