I am caching some of my tables into memory using shared class like show below or as entity POCO object. I tried both of them.
- Code: Select all
Public Shared Function CacheDT() As cacheDS.CacheDataTable
If _CacheDT Is Nothing Then
Dim myCacheTableAdapter As New cacheDSTableAdapters.CacheTableAdapter
_CacheDT = myCacheTableAdapter.GetData()
there are plenty of tables which arent changed frequently in my DB. that's why i am caching about 2 GB of data in the memory. my developer machine has 16 gb ram and webserver has 64 gb ram. I am getting system out of memory exception altougt physical memory usage isnt even reaching 8 gb. I found that nice article explaining me it is nothing to do with physical memory but addressing fact http://blogs.msdn.com/b/ericlippert/arc ... emory.aspx
Indeed in the article he says it shouldnt be a problem with 64bit machine but my both machines are 64. how does it occur? how can I manage my memory by setting up something or coding something in VB or C#?
I would like to profile my application using ants profiler, I need your advise as I am newbie on that.
thanks for suggestion.