G
Guest
We have a large Asp.net application that is currently crashing our production
servers. What we are seeing is the aspnet_wp eat up a bunch of memory and
then stop unexpectedly. Does not recycle.
Example:
After about 5 hours with a concurrent user base of about 150 users the
application raises the aspnet_wp memory usage by almost 500MB. If our server
guys modify the web.config this data is released and the workerprocess goes
back to a manageable amount of memory.
What we have done:
We have been using the DevPartner studio for memory analysis and code review
as well as CLR Profiler and some Perfmon counters. Everything is showing
that for a single user the application is only using about 1 MB of ram with
temporary object spikes upto 25 mb which are getting collected. We have
scanned our code adding dispose and close methods were possible. Everything
looks fine at least to our eyes and the tools eyes.
Don't know what else there is. We think it may be the large object heap but
not sure. Also, we are using SQL Session state if that makes any difference.
In order to help replicate this problem we create a couple of simple pages
that did things a couple of ways.
1. Have a blank page that has in it's page load a nested for loop that uses
a string builder to create a table 3 columns wide and 20 rows deep. Then use
a response.write to push to the screen.
2. Have another page that does the same thing but uses a Server side html
table (<ASP:Table>) objects to create the same structure.
What we see is that when we do a refresh a bunch of times the worker process
sits stable for a few seconds and then starts to blow up in about 200KB
chunks for about 20MB of extra memory consumption. After leaving it idle for
a good 15 minutes or so it still consumes that memory. If we run the same
page with a manual GC.Collect it still tended to grow but not as much.
If we added the GC.GetTotalMemUsage(true) method call we saw that the memory
usage usually stayed pretty consistant.
What we are seeing is probably something similar to what we are getting in
our apps.
Is there something we are missing? We really need help with this one.
Also, I think our servers have the latest server packs for .net and
Win2KServer.
We also see this same behavior on our client machines when running through
the ide.
We are trying to figure this out because we are getting ready to release an
even larger app that will have roughly 500-600 concurrent users and we don't
want it to crash all the time either.
One thing that is weird is that in perfmon when setting up all the .net
memory and asp.net counters nothing even comes close to showing the memory
usage (even in totals) that taskmanager is reporting for memory consumption.
With that being said were is it going???????
We have been running some memory leak analysis as well and found that we had
a minor contained leak of about 150KB. I say contained because on a per user
basis we were never able to get it to grow beyond that...
Any help that people can provide would be great.
servers. What we are seeing is the aspnet_wp eat up a bunch of memory and
then stop unexpectedly. Does not recycle.
Example:
After about 5 hours with a concurrent user base of about 150 users the
application raises the aspnet_wp memory usage by almost 500MB. If our server
guys modify the web.config this data is released and the workerprocess goes
back to a manageable amount of memory.
What we have done:
We have been using the DevPartner studio for memory analysis and code review
as well as CLR Profiler and some Perfmon counters. Everything is showing
that for a single user the application is only using about 1 MB of ram with
temporary object spikes upto 25 mb which are getting collected. We have
scanned our code adding dispose and close methods were possible. Everything
looks fine at least to our eyes and the tools eyes.
Don't know what else there is. We think it may be the large object heap but
not sure. Also, we are using SQL Session state if that makes any difference.
In order to help replicate this problem we create a couple of simple pages
that did things a couple of ways.
1. Have a blank page that has in it's page load a nested for loop that uses
a string builder to create a table 3 columns wide and 20 rows deep. Then use
a response.write to push to the screen.
2. Have another page that does the same thing but uses a Server side html
table (<ASP:Table>) objects to create the same structure.
What we see is that when we do a refresh a bunch of times the worker process
sits stable for a few seconds and then starts to blow up in about 200KB
chunks for about 20MB of extra memory consumption. After leaving it idle for
a good 15 minutes or so it still consumes that memory. If we run the same
page with a manual GC.Collect it still tended to grow but not as much.
If we added the GC.GetTotalMemUsage(true) method call we saw that the memory
usage usually stayed pretty consistant.
What we are seeing is probably something similar to what we are getting in
our apps.
Is there something we are missing? We really need help with this one.
Also, I think our servers have the latest server packs for .net and
Win2KServer.
We also see this same behavior on our client machines when running through
the ide.
We are trying to figure this out because we are getting ready to release an
even larger app that will have roughly 500-600 concurrent users and we don't
want it to crash all the time either.
One thing that is weird is that in perfmon when setting up all the .net
memory and asp.net counters nothing even comes close to showing the memory
usage (even in totals) that taskmanager is reporting for memory consumption.
With that being said were is it going???????
We have been running some memory leak analysis as well and found that we had
a minor contained leak of about 150KB. I say contained because on a per user
basis we were never able to get it to grow beyond that...
Any help that people can provide would be great.