HighTechTalks DotNet Forums  

ASP.NET 2.0 caching problem(s)...

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss ASP.NET 2.0 caching problem(s)... in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
MichaelY
 
Posts: n/a

Default ASP.NET 2.0 caching problem(s)... - 03-04-2006 , 07:00 PM






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?

Reply With Quote
  #2  
Old   
Alvin Bruney - ASP.NET MVP
 
Posts: n/a

Default Re: ASP.NET 2.0 caching problem(s)... - 03-06-2006 , 01:26 PM






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
-------------------------------------------------------



"MichaelY" <MichaelY (AT) discussions (DOT) microsoft.com> wrote

Quote:
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?



Reply With Quote
  #3  
Old   
MichaelY
 
Posts: n/a

Default Re: ASP.NET 2.0 caching problem(s)... - 03-06-2006 , 01:42 PM



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..

Reply With Quote
  #4  
Old   
Manso
 
Posts: n/a

Default Re: ASP.NET 2.0 caching problem(s)... - 03-06-2006 , 03:50 PM



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:

Quote:
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..

Reply With Quote
  #5  
Old   
Alvin Bruney - ASP.NET MVP
 
Posts: n/a

Default Re: ASP.NET 2.0 caching problem(s)... - 03-06-2006 , 04:27 PM



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
-------------------------------------------------------



"Manso" <Manso (AT) discussions (DOT) microsoft.com> wrote

Quote:
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..



Reply With Quote
  #6  
Old   
Manso
 
Posts: n/a

Default Re: ASP.NET 2.0 caching problem(s)... - 03-06-2006 , 04:41 PM



I posted a possible solution on a separate thread...

http://msdn.microsoft.com/newsgroups...d95&sloc=en-us

Is your problem similar to this?

- Manso

"MichaelY" wrote:

Quote:
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..

Reply With Quote
  #7  
Old   
MichaelY
 
Posts: n/a

Default Re: ASP.NET 2.0 caching problem(s)... - 03-06-2006 , 07:00 PM



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.

Reply With Quote
  #8  
Old   
Manso
 
Posts: n/a

Default Re: ASP.NET 2.0 caching problem(s)... - 03-07-2006 , 06:42 AM



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:

Quote:
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.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.