473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Why does ASP.NET release cache items before the expiration time?

I have Win2003 64bit server with 6 GB or RAM. Windows Task Manager displays
that:

* 0.5 GB are taken by IIS
* 2.0 GB - SQL Server and other applications
* 3 GB - System Cache
* 0.5 GB - available

So it seems like I have plenty of available RAM. However when I add small
data objects to the ASP.NET cache it almost immediately automatically deletes
them, although I set 10 mins experation time and use CacheItemPriority.High.

What could be wrong? The same code works fine on my WindowsXP with 750MB of
RAM.

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200611/1

Nov 14 '06 #1
2 1393
Have you also checked to see how often the server is refreshing the
application pool? Have you checked to ensure that the application isnt'
restarting for some reason as well? I had an issue with a virus scanner a
long time ago that would scan my web.config and restart my application every
so often.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Sergey via DotNetMonster.com" <no@spam.plswrote in message
news:694a928f639d9@uwe...
>I have Win2003 64bit server with 6 GB or RAM. Windows Task Manager displays
that:

* 0.5 GB are taken by IIS
* 2.0 GB - SQL Server and other applications
* 3 GB - System Cache
* 0.5 GB - available

So it seems like I have plenty of available RAM. However when I add small
data objects to the ASP.NET cache it almost immediately automatically
deletes
them, although I set 10 mins experation time and use
CacheItemPriority.High.

What could be wrong? The same code works fine on my WindowsXP with 750MB
of
RAM.

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200611/1

Nov 15 '06 #2
It should not be related to the application pool. I have 1740 minutes as the
recycling period and I do not see any records in the Event Viewer. The
application is not restarting. I have http module that catches AppInit events
and sends me an email notification every time the web application starts.

Actually I tried to add objects to the cache using CacheItemPriority.
NotRemovable instead of CacheItemPriority.High and in this case objects stay
in the cache. This would happen if I do not have enough memory, but according
to Task Manager I have 500MB of available RAM + 3GB of system cache that I
believe should have lower priority than the ASP.NET cache.

BTW does anyone knows whether the ASP.NET cache has really higher priority
than the windows system cache? I have another application running on my
server that is constantly reading a few files per second. There are millions
of these files. Maybe Windows just grabs all the resources for the disk cache
and makes ASP.NET clear its cache?


Mark Fitzpatrick wrote:
>Have you also checked to see how often the server is refreshing the
application pool? Have you checked to ensure that the application isnt'
restarting for some reason as well? I had an issue with a virus scanner a
long time ago that would scan my web.config and restart my application every
so often.
>>I have Win2003 64bit server with 6 GB or RAM. Windows Task Manager displays
that:
[quoted text clipped - 13 lines]
>of
RAM.
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200611/1

Nov 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Florian Lindner | last post by:
Hello, I am building a object cache in python, The cache has a maximum size and the items have expiration dates. At the moment I'm doing like that: cache = {} # create dictionary cache =...
2
by: Dicky Cheng | last post by:
Hi, I am using absolute expiration to expire my cache object in Cache API. And I set it to expire after 60min. Then I test it, it cache, and everything fine. Then I stop working and lock...
4
by: Guadala Harry | last post by:
I want to create a STATIC method that removes all items from the Cache. Questions: 1. Is a safe thing to do (any threading issues?) 2. Is the following code a good way to get the job done -...
1
by: Guadala Harry | last post by:
AFAIK, when placing an object into the Cache with no special instructions (no dependencies, sliding expirations, hard expirations, etc), it will just sit there in the Cache until the system decides...
2
by: Kikoz | last post by:
Hi all. I keep my ViewState in server's cache. Works fine except when user leaves the page opened for a long time (2 hours or so). Then if he/she tries to post it back the server throws an...
6
by: Adam | last post by:
On an xp machine, the caching works as expected. I have deployed to a win2k server, and an item I add to the cache expires almost immediately some times and in under a minute in other times. The...
2
by: sternr | last post by:
Hey, (Sorry if the thread has been posted twice!) I'm using the System.Web.Caching.Cache object in my Win App and basically, it's great! I use a sliding expiration TimeStamp to the object I put...
2
by: Jim Carr | last post by:
Upon entering the site www.FutureByDesign-Music.com with IE6, my clipboard is erased and then disabled in all other Windows XP applications. Navigating to another site returns clipboard...
2
by: =?Utf-8?B?Y2F0?= | last post by:
We recently moved an older ASP.NET 1.1 code base on to ASP.NET 2.0, .NET 3.0 and Windows 2003 Server SP2. We started experiencing the following issue with the web cache (the code is straightforward...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.