ASP.NET - ASP.Net Cache not working in production server

Asked By joker george on 14-Oct-09 11:08 PM

Hi,

I recently found out all cache in my production server is not function.
I try to build 2 test aspx page, each have 2 textbox and one button.
When the button click i will store textbox  value in cache, then redirect to second page.
In second page on load event, i will set the second page textbox value to cache value.
All this work fine in my develop machine, however, after i upload the project to my server, all the thing go wrong.
It keep get Cache is null. Anybody any idea?

Thanks in advance

add the following in the web.config - Venkat K replied to joker george on 15-Oct-09 12:28 AM

  1. <caching>  
  2.   <cache disableMemoryCollection = "true"  
  3.     disableExpiration = "false"  
  4.     privateBytesLimit = "0"  
  5.     percentagePhysicalMemoryUsedLimit = "90"  
  6.     privateBytesPollTime = "00:02:00"/>  
  7. </caching>  

Check this link for more information:

http://www.johnsadventures.com/archives/2006/02/why_does_my_aspnet_cache_keep_clearing_i/

 

Thanks,

Still same - joker george replied to Venkat K on 15-Oct-09 01:37 AM

Thanks for your fast reply, after  i test, it still same.... any idea?

Same for Session Variable and Application Variable - joker george replied to Venkat K on 15-Oct-09 04:18 AM

I try change to use session variable or Application variable for this case, all facing same problem.

Whant am i doing wrong?

ASP.Net Cache not working in production server - mv ark replied to joker george on 15-Oct-09 07:31 AM
This is most possibly a memory issue. As Rick Strahl reports here - http://www.west-wind.com/weblog/posts/11379.aspx

"low memory and cache refusal might actually much more common than you expect. ISPs for example often run in tight memory environments as they keep the AppPool memory limits really low."
thank - joker george replied to mv ark on 15-Oct-09 10:08 PM

Hi,

beside of memory, not enough space for hard disk will cause this  problem or not?


Thanks

maximum no. of work process - joker george replied to mv ark on 16-Oct-09 02:26 AM

OK, finally find out what cause low memory in my server. We set maximum no. of work process to 3 for our .Net Application Pool, and this cause use up a lot of memory space.

Is this normal? or we should not set maximum no. of work process to more than 1?