473,785 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 CacheItemPriori ty.High.

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

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

Nov 14 '06 #1
2 1405
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.c om" <no@spam.plswro te in message
news:694a928f63 9d9@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
CacheItemPriori ty.High.

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

--
Message posted via DotNetMonster.c om
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 CacheItemPriori ty.
NotRemovable instead of CacheItemPriori ty.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.c om
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
1514
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 = (object, timestamp) # Save a tuple with the object itself and a timestamp (from datetime.datetime.now()) under a unique object ID. This make looking up a certain item a cheap operation (AFAIK). After looking up
2
3322
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 computer (pc still running), then leave office. Second day I come to the office and unlock computer, the cache still doesn't expire! (It already exceed 60min). And I use the cache, and it still working. And after awhile, the cache start flushing. So I am...
4
4178
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 - given that there is apparently no method like Cache.Clear() or Cache.Items.Clear()? Or am I missing an easier way to do it? string currentKey= "";
1
2865
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 it needs to remove the object to free up memory. (If my understanding so far is wrong, please clarify) What I'd like to know is that if I place an object into the Cache with a sliding expiration - is it possible/likely that the system will...
2
1987
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 exception saying that ViewState was invalid. I suspect it has something to do with cache expiration time. Can I control its expiration time from within my web.config? Or anyhow? Couldn't find anything related in web or machine config files or...
6
1768
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 aspnet_wp process is not restarting during this time, and there are no other requests, so nothing should be clearing this out. I have added a CacheItemRemovedCallback which writes debug info out to a DefaultTraceListener, but no output shows up on...
2
2723
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 in the Cache. When I try and get the object after it's sliding expiration time I get null (as excepted of course), But the problem is that the memory is never cleaned - my application's memory just keeps on growing event after the object...
2
2893
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 functionality, but whatever was on the clipboard before is lost. If I disable running JavaScript on the page, the clipboard is unaffected. Viewing the page in Firefox does not have this issue. I think it might be the script below, which makes no sense...
2
2856
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 and worked flawlessy before the upgrade): Dim o As Object = Cache.Get(key) If o Is Nothing Then Cache.Insert(key, GetTheData()) o = Cache.Get(key) End If
0
9489
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4061
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.