Red Gate forums :: View topic - system out of memory exception having 50% of the ram used
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler 7
ANTS Memory Profiler 7 forum

system out of memory exception having 50% of the ram used

Search in ANTS Memory Profiler 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
batmaci



Joined: 13 Jul 2012
Posts: 2

PostPosted: Fri Jul 13, 2012 12:18 pm    Post subject: system out of memory exception having 50% of the ram used Reply with quote

Hi,

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:

 Public Shared Function CacheDT() As cacheDS.CacheDataTable
        If _CacheDT Is Nothing Then
            Dim myCacheTableAdapter As New cacheDSTableAdapters.CacheTableAdapter
            _CacheDT = myCacheTableAdapter.GetData()
        End If
        Return _CacheDT
    End Function



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/archive/2009/06/08/out-of-memory-does-not-refer-to-physical-memory.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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6580

PostPosted: Mon Jul 16, 2012 10:44 am    Post subject: Reply with quote

If the process you are profiling is 32-bit (compiled as "x86"), then Windows has a process memory limit of 2GB. .NET Framework starts to get unstable at about 1.5GB, typically, and throws an outofmemoryexception.
Back to top
View user's profile Send private message
batmaci



Joined: 13 Jul 2012
Posts: 2

PostPosted: Mon Jul 16, 2012 10:48 am    Post subject: Re: Reply with quote

Brian Donahue wrote:
If the process you are profiling is 32-bit (compiled as "x86"), then Windows has a process memory limit of 2GB. .NET Framework starts to get unstable at about 1.5GB, typically, and throws an outofmemoryexception.


hi Brian,

thanks for your reply but I checked all projects and they are running as "any CPU". my developer machine and server are both 64. that means I believe i am not running 32. Am I correct? thanks
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6580

PostPosted: Mon Jul 16, 2012 11:48 am    Post subject: Reply with quote

Maybe/maybe not. You can get anycpu to run as 32-bit if you put the program in the (x86) profram files folder. If you view the process in Task Manager, has it got a *32 next to the process name?
Back to top
View user's profile Send private message
dene.boulton



Joined: 12 Oct 2011
Posts: 53
Location: Cambridge

PostPosted: Mon Jul 16, 2012 2:24 pm    Post subject: Reply with quote

Also if the application is a WebApp deployed to IIS, and the application pool that the app runs in has the "Enable 32-bit application" setting set to "True". If this is the case then the worker process, like Brian says, will be w3wp.exe *32
_________________
Dene Boulton
Red Gate
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group