asp.net caching:
I am starting to observe some rather "odd" behaviors with ASP.NET 2.0 apps that use the Cache object for storage of global data items. These apps worked perfectly under 1.1, but now it seems like the 2.0 cache likes to sometimes Insert items into the cache, sometimes not, and sometimes remove them seconds after they've been inserted. I've seen a few comments on this group about it, but with no "formal" answers. I have never seen any of these issues under 1.1 - everything worked as documented. Is there a definite issues with the 2.0 caching object(s)???? And if so,
Among the most frequent are Cache.Insert()ions with objects that literally seem to 'dissappear'. In other words, I load up a metadata table (DataTable) into Cache. Every field on a group of web forms use this info to control rendering, display visibility, etc. However, the pattern that we end up seeing is the object being removed LONG before it's expiration (15 mins), and then subsequent insert()'s failing (meaning the object isn't present after the insert - like the insert said 'nope...sorry'). I have been able to 'pin' the objects there by specifying CacheItemPriority.NotRemovable, but why should I have to do this??? I expect on a machine with 4GB's of RAM (and the worker using about ~100MB) for the items to be there for a least a few minutes (maybe 15???)....and then it would be nice to have other calls to Insert() work. On the product feedback center for MS, this issues has been reported, but is marked as "not reproducable". Seems odd, doesn't it????? Especially when others report the same problem. Have there been landslide changes in the CacheManager, or some other subsystem (HealthMonitoring maybe???) that is now chewing up heap space????
I agree. There is something fishy with the Cache (my post two post above yours). I can't figure out what's going on. You are not using HttpRuntime.Cache, are you? Let me do some more investigation on HttpContext.Current.Cache. It seems to work there but I have a few gerneic functions located in a class lib that are being executed using CallbackTimer so I need to access the HttpRuntime.Cache. - M [quoted text, click to view] "MichaelY" wrote: > Among the most frequent are Cache.Insert()ions with objects that literally > seem to 'dissappear'. In other words, I load up a metadata table (DataTable) > into Cache. Every field on a group of web forms use this info to control > rendering, display visibility, etc. However, the pattern that we end up > seeing is the object being removed LONG before it's expiration (15 mins), and > then subsequent insert()'s failing (meaning the object isn't present after > the insert - like the insert said 'nope...sorry'). > > I have been able to 'pin' the objects there by specifying > CacheItemPriority.NotRemovable, but why should I have to do this??? I expect > on a machine with 4GB's of RAM (and the worker using about ~100MB) for the > items to be there for a least a few minutes (maybe 15???)....and then it > would be nice to have other calls to Insert() work. > > On the product feedback center for MS, this issues has been reported, but is > marked as "not reproducable". Seems odd, doesn't it????? Especially when > others report the same problem. Have there been landslide changes in the > CacheManager, or some other subsystem (HealthMonitoring maybe???) that is now > chewing up heap space???? >
What issues exactly? -- Regards, Alvin Bruney [MVP ASP.NET] [Shameless Author plug] The Microsoft Office Web Components Black Book with .NET Now Available @ www.lulu.com/owc Forth-coming VSTO.NET - Wrox/Wiley 2006 ------------------------------------------------------- [quoted text, click to view] "MichaelY" <MichaelY@discussions.microsoft.com> wrote in message news:E22BBFE1-D089-4F99-A68B-7F831273D81E@microsoft.com... > I am starting to observe some rather "odd" behaviors with ASP.NET 2.0 apps > that use the Cache object for storage of global data items. These apps > worked perfectly under 1.1, but now it seems like the 2.0 cache likes to > sometimes Insert items into the cache, sometimes not, and sometimes remove > them seconds after they've been inserted. I've seen a few comments on this > group about it, but with no "formal" answers. I have never seen any of these > issues under 1.1 - everything worked as documented. > > Is there a definite issues with the 2.0 caching object(s)???? And if so, > ummm....fix?
I posted a possible solution on a separate thread... http://msdn.microsoft.com/newsgroups/managed/default.aspx?dg=microsoft.public.dotnet.framework.aspnet.caching&mid=21114551-f902-42ad-ac5b-c3df5d941d95&sloc=en-us Is your problem similar to this? - Manso [quoted text, click to view] "MichaelY" wrote: > Among the most frequent are Cache.Insert()ions with objects that literally > seem to 'dissappear'. In other words, I load up a metadata table (DataTable) > into Cache. Every field on a group of web forms use this info to control > rendering, display visibility, etc. However, the pattern that we end up > seeing is the object being removed LONG before it's expiration (15 mins), and > then subsequent insert()'s failing (meaning the object isn't present after > the insert - like the insert said 'nope...sorry'). > > I have been able to 'pin' the objects there by specifying > CacheItemPriority.NotRemovable, but why should I have to do this??? I expect > on a machine with 4GB's of RAM (and the worker using about ~100MB) for the > items to be there for a least a few minutes (maybe 15???)....and then it > would be nice to have other calls to Insert() work. > > On the product feedback center for MS, this issues has been reported, but is > marked as "not reproducable". Seems odd, doesn't it????? Especially when > others report the same problem. Have there been landslide changes in the > CacheManager, or some other subsystem (HealthMonitoring maybe???) that is now > chewing up heap space???? >
That is the exact "solution" is used to pin the objects into the cache. However, as I mentioned above, I don't consider this a viable solution (after all, I'd still like the scavenger to do what it does best). I guess the crux of the issues is this: If there were such a change in the runtime, then how come no one seems (MS???) to know about it????
keep us posted. That ones got my interest. -- Regards, Alvin Bruney [MVP ASP.NET] [Shameless Author plug] The Microsoft Office Web Components Black Book with .NET Now Available @ www.lulu.com/owc Forth-coming VSTO.NET - Wrox/Wiley 2006 ------------------------------------------------------- [quoted text, click to view] "Manso" <Manso@discussions.microsoft.com> wrote in message news:33502819-8452-4C56-AA13-7DBA1167B3E8@microsoft.com... > I agree. There is something fishy with the Cache (my post two post above > yours). I can't figure out what's going on. You are not using > HttpRuntime.Cache, are you? > > Let me do some more investigation on HttpContext.Current.Cache. It seems to > work there but I have a few gerneic functions located in a class lib that are > being executed using CallbackTimer so I need to access the HttpRuntime.Cache. > > - M > > "MichaelY" wrote: > > > Among the most frequent are Cache.Insert()ions with objects that literally > > seem to 'dissappear'. In other words, I load up a metadata table (DataTable) > > into Cache. Every field on a group of web forms use this info to control > > rendering, display visibility, etc. However, the pattern that we end up > > seeing is the object being removed LONG before it's expiration (15 mins), and > > then subsequent insert()'s failing (meaning the object isn't present after > > the insert - like the insert said 'nope...sorry'). > > > > I have been able to 'pin' the objects there by specifying > > CacheItemPriority.NotRemovable, but why should I have to do this??? I expect > > on a machine with 4GB's of RAM (and the worker using about ~100MB) for the > > items to be there for a least a few minutes (maybe 15???)....and then it > > would be nice to have other calls to Insert() work. > > > > On the product feedback center for MS, this issues has been reported, but is > > marked as "not reproducable". Seems odd, doesn't it????? Especially when > > others report the same problem. Have there been landslide changes in the > > CacheManager, or some other subsystem (HealthMonitoring maybe???) that is now > > chewing up heap space???? > > > > Grrr....LoL..
I agree with you. The workaround feels a bit shakey. As this is a managed newsgroup we can always hope that someone from MS pays attention to it or at least comment on it. Once pinned down I don't feel I have the time to report it through our support contract. - Manso [quoted text, click to view] "MichaelY" wrote: > That is the exact "solution" is used to pin the objects into the cache. > However, as I mentioned above, I don't consider this a viable solution (after > all, I'd still like the scavenger to do what it does best). > > I guess the crux of the issues is this: If there were such a change in the > runtime, then how come no one seems (MS???) to know about it???? >
On Tue, 7 Mar 2006 03:42:58 -0800, Manso [quoted text, click to view] <Manso@discussions.microsoft.com> wrote: >I agree with you. The workaround feels a bit shakey. > >As this is a managed newsgroup we can always hope that someone from MS pays >attention to it or at least comment on it. Once pinned down I don't feel I >have the time to report it through our support contract. > >- Manso > >"MichaelY" wrote: > >> That is the exact "solution" is used to pin the objects into the cache. >> However, as I mentioned above, I don't consider this a viable solution (after >> all, I'd still like the scavenger to do what it does best). >> >> I guess the crux of the issues is this: If there were such a change in the >> runtime, then how come no one seems (MS???) to know about it???? >> >> ...sigh.
If you can provide me with a repro of this, I can look into it. You can send it to jamesche at Microsoft.com. Jim Cheshire Blog: http://blogs.msdn.com/jamesche
Don't see what you're looking for? Try a search.
|