Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All, w3wp.exe process is taking huge memory (RAM) for my app... when i run the app am getting "system out of memory" and sometimes "object reference not set to an instance of an object".. am using LINQ to SQL ,asp.net 3.5 Please advise me .
Thanks in advance..
Posted
Comments
Praveen Kumar Upadhyay 8-Dec-14 1:45am    
There are n number of reason for taking huge ram by w3wp.exe. So based on this small description we can not solve your problem. You need to understand your code which can take huge memory.
Kornfeld Eliyahu Peter 8-Dec-14 2:52am    
w3wp.exe is the process running web sites inside IIS (w3 is www and wp is workind process).
It should use more and more memory according to the number of request it handles...Also the lifetime of a session affects it size...
But most important the memory usage of your app. To see what the problem you must debug the error messages you mentioned in your post and start follow the path from there...
Nathan Minier 8-Dec-14 7:50am    
You're likely using LINQ incorrectly: enumerating before you filter or using multiple enumerations. You may also have object disposal issues. Please post some relevant code so that we can help you on it.

1 solution

Most probably your code is causing a memory leak, i.e. you are allocating huge resources and not freeing up the memory.
There are situations where the application can do that when it is handling huge strings, but I would suggest you check your code for objects like images, files, connections, streams strings, XML etc.
The best way is to use profiles and analyze the memory occupation.

As to the out of memory exception, it is clear, one the system runs low on memory, and then a lime of code requires memory allocation like (new object ()) then it is null reference exception with be thrown.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900