Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > w3wp.exe (ASP .Net) eating memory

Reply
Thread Tools

w3wp.exe (ASP .Net) eating memory

 
 
venom00
Guest
Posts: n/a
 
      11-17-2009
Hello, i'm on a VPS with Windows 2003 x64 (IIS 6.0 so) and i have a
serious problem with w3wp.exe. It starts from 60 Mb and then grows
until the whole avaiable RAM is used.

http://img32.imageshack.us/img32/4120/w3wpgraph.png

Here's an example image showing w3wp.exe private bytes and Gen 0 Heap
size. They seems related, but if I use ".NET CLR Memory/# Bytes in all
Heaps " it is much lower than private bytes. Can we still say that is
an ASP .Net problem?

Moreover analyzing a crash dump the heap size i obtain is smaller, 200
Mb while the crash dump was 700 mb and private bytes about 600 mb.

http://pastebin.com/m6c448c9d

Here is also a !dumpheap -stat:

http://pastebin.com/m7fd72aa

I've done a "!dumpheap -mt 000006427881aaf8" (the System.String entry)
and I've found that the bigger strings are aspx pages. I've a lot of
them on my website (thousands). Maybe w3wp.exe is caching them? How
can i disable this feature?
!gcroot on one of this strings gives the following output:

http://pastebin.com/m15545adc

Does this mean it's orphaned but not collected by the GC?

Here's a "!dumpheap -stat -type Cach":

http://pastebin.com/m2955d688

And a !do and a !gcroot of a CacheEntry:

http://pastebin.com/f38df0a24


If you need it, I can also give you the link to the whole dump. I've
been working on it for a week without results!

Thanks in advance,
Carl
 
Reply With Quote
 
 
 
 
venom00
Guest
Posts: n/a
 
      11-17-2009
On 17 Nov, 21:20, "Mr. Arnold" <(E-Mail Removed)> wrote:
> venom00 wrote:
>
> <snipped>
>
> W3wp.exe is the process that hosts ASP.NET applications. It does nothing
> on its own. So, some ASP.NET application W3wp.exe is hosting is using all
> the memory and not W3wp.exe itself.
>
> > If you need it, I can also give you the link to the whole dump. I've
> > been working on it for a week without results!

>
> You can use Process Explorer to look at a running process such as
> w3wp.exe in the upper pane, right-click select Properties to see what
> w3wp.exe is hosting at runtime along with other properties that can help
> determine who is doing what during the process.
>
> You can set the lower pane off of Tools/View to show all DLL(s) being
> hosted by a given process too.
>
> http://technet.microsoft.com/en-us/s.../bb896653.aspx


Well, i know what w3wp is, but my pages aren't doing anything special,
just some DB connections. The problem seems that the ASPX files get
cached for some reason in w3wp.exe and so it grows without limits.
I've tried to limit the cache through the caching element in
web.config, but it doesn't seem to work.
I need to know who and why is using all that memory, if it's not for
caching. Any ideas?
What should you do with DLLs loaded by w3wp?
 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      11-18-2009
unlike c/c++, .net dll's can not be unloaded except thru a app domain
recycle. every page is compiled into a dll and loaded. high memory use
can be due to:

1) a lot of pages
2) large session / application data
3) failure to release unmanaged memory (database connections)

also if there is memory available, asp.net will grow rather then run the
GC. check your settings.

if you want to know whats going on, get the sos.dll for the windows
debugger.

-- bruce (sqlwork.com)

venom00 wrote:
> On 17 Nov, 21:20, "Mr. Arnold" <(E-Mail Removed)> wrote:
>> venom00 wrote:
>>
>> <snipped>
>>
>> W3wp.exe is the process that hosts ASP.NET applications. It does nothing
>> on its own. So, some ASP.NET application W3wp.exe is hosting is using all
>> the memory and not W3wp.exe itself.
>>
>>> If you need it, I can also give you the link to the whole dump. I've
>>> been working on it for a week without results!

>> You can use Process Explorer to look at a running process such as
>> w3wp.exe in the upper pane, right-click select Properties to see what
>> w3wp.exe is hosting at runtime along with other properties that can help
>> determine who is doing what during the process.
>>
>> You can set the lower pane off of Tools/View to show all DLL(s) being
>> hosted by a given process too.
>>
>> http://technet.microsoft.com/en-us/s.../bb896653.aspx

>
> Well, i know what w3wp is, but my pages aren't doing anything special,
> just some DB connections. The problem seems that the ASPX files get
> cached for some reason in w3wp.exe and so it grows without limits.
> I've tried to limit the cache through the caching element in
> web.config, but it doesn't seem to work.
> I need to know who and why is using all that memory, if it's not for
> caching. Any ideas?
> What should you do with DLLs loaded by w3wp?

 
Reply With Quote
 
venom00
Guest
Posts: n/a
 
      11-18-2009
> 1) a lot of pages

Why a lot of pages shuold be a problem? I've tried to remove any
possible caching through web.config but nothing changed.

> 2) large session / application data


That's not my case, I almnost don't use sessions.

> 3) failure to release unmanaged memory (database connections)


Ok, i think that somewhere i leave DB connections open, but they
should be closed when gargabage collected, isn't it?
Anyway how can a couple of connections make RAM usage grow so much?

I think this is a sort of .Net x64 bug:

http://blogs.msdn.com/tess/archive/2...e-process.aspx
http://support.microsoft.com/?scid=k...12891&x=15&y=5

The first article is exactly describing my issue. However the fix is
not public. I think I'll get back to 32 bit.
What do you think? Can this be the problem?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
eating memory lalawiet@gmail.com C++ 6 03-16-2007 03:42 PM
Program eating memory, but only on one machine? Per B. Sederberg Python 5 01-22-2007 08:14 PM
Fx 1.5.0.1 media player plug-in eating memory Faun Firefox 0 02-26-2006 04:32 PM
Nero eating up / hiding memory DVD Video 3 07-09-2005 01:54 AM
4DOM eating all my memory ewan Python 1 02-02-2004 12:27 AM



Advertisments