| Author |
Message |
batmaci
Joined: 13 Jul 2012 Posts: 2
|
Posted: Fri Jul 13, 2012 12:18 pm Post subject: system out of memory exception having 50% of the ram used |
|
|
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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Mon Jul 16, 2012 10:44 am Post subject: |
|
|
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
batmaci
Joined: 13 Jul 2012 Posts: 2
|
Posted: Mon Jul 16, 2012 10:48 am Post subject: Re: |
|
|
| 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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Mon Jul 16, 2012 11:48 am Post subject: |
|
|
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? _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
dene.boulton
Joined: 12 Oct 2011 Posts: 50 Location: Cambridge
|
Posted: Mon Jul 16, 2012 2:24 pm Post subject: |
|
|
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 |
|
 |
|
|
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