472,353 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

ASPNET 1.1 Memory Issues / Leak or heap problems

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.
Nov 19 '05 #1
16 2217
Please can you provide more information? Hardware specs will be pretty good
as well as if you are running Windows 2000 or 2003, what version of that
operating system. Running IIS 5 or 6? How much memory on the computer?

Are you using C# Cache class?

Let's see if we can figure it out.

Thanks
Al

"JCauble" wrote:
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.

Nov 19 '05 #2
Please can you provide more information? Hardware specs will be pretty good
as well as if you are running Windows 2000 or 2003, what version of that
operating system. Running IIS 5 or 6? How much memory on the computer?

Are you using C# Cache class?

Let's see if we can figure it out.

Thanks
Al

"JCauble" wrote:
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.

Nov 19 '05 #3
Please can you provide more information? Hardware specs will be pretty good
as well as if you are running Windows 2000 or 2003, what version of that
operating system. Running IIS 5 or 6? How much memory on the computer?

Are you using C# Cache class?

Let's see if we can figure it out.

Thanks
Al
"JCauble" wrote:
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.

Nov 19 '05 #4
Please can you provide more information? Hardware specs will be pretty good
as well as if you are running Windows 2000 or 2003, what version of that
operating system. Running IIS 5 or 6? How much memory on the computer?

Are you using C# Cache class?

Let's see if we can figure it out.

Thanks
Al
"JCauble" wrote:
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.

Nov 19 '05 #5
Please can you provide more information? Hardware specs will be pretty good
as well as if you are running Windows 2000 or 2003, what version of that
operating system. Running IIS 5 or 6? How much memory on the computer?

Are you using Cache class?

Let's see if we can figure it out.

Thanks
Al
"JCauble" wrote:
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.

Nov 19 '05 #6
The server is Windows 2000 Server it has 3GB of ram IIS 5, I know it's a dual
processor but not sure what the processors are.

We hope to get Window 2003 Server and IIS6 in place later this year but
that's dosen't help the problem now.

On the client I have a dual Xeon with 1GB of ram on w2K pro. Seeing a
similar issue for memory escelation without release. Even left it running
overnight with no activity and it never cleared up.

We are not using the Cache class. We even tried to tell it to not cache
some of the pages to see what would happen and it did not change anything.

Thanks.

"Albert Pascual" wrote:
Please can you provide more information? Hardware specs will be pretty good
as well as if you are running Windows 2000 or 2003, what version of that
operating system. Running IIS 5 or 6? How much memory on the computer?

Are you using C# Cache class?

Let's see if we can figure it out.

Thanks
Al

"JCauble" wrote:
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.

Nov 19 '05 #7
Hi JCauble:

You might want to use the ADPlus utility to get snapshots of the
process before it terminates. This and other tricks are described in
the following document:

http://msdn.microsoft.com/library/en...asp?frame=true
HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 25 Feb 2005 07:43:06 -0800, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
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.


Nov 19 '05 #8
Your nntp poster is stuttering, Albert.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

"Albert Pascual" <Al***********@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
Please can you provide more information? Hardware specs will be pretty
good
as well as if you are running Windows 2000 or 2003, what version of that
operating system. Running IIS 5 or 6? How much memory on the computer?

Are you using Cache class?

Let's see if we can figure it out.

Thanks
Al
"JCauble" wrote:
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.

Nov 19 '05 #9
I had some problems using Windows 2000 with large applications, I moved the
same ASP.NET app to 2003 Enterprise/IIS 6 and memory got released.

Always thought that there was a problem with IIS 5 releasing memory

"JCauble" wrote:
The server is Windows 2000 Server it has 3GB of ram IIS 5, I know it's a dual
processor but not sure what the processors are.

We hope to get Window 2003 Server and IIS6 in place later this year but
that's dosen't help the problem now.

On the client I have a dual Xeon with 1GB of ram on w2K pro. Seeing a
similar issue for memory escelation without release. Even left it running
overnight with no activity and it never cleared up.

We are not using the Cache class. We even tried to tell it to not cache
some of the pages to see what would happen and it did not change anything.

Thanks.

"Albert Pascual" wrote:
Please can you provide more information? Hardware specs will be pretty good
as well as if you are running Windows 2000 or 2003, what version of that
operating system. Running IIS 5 or 6? How much memory on the computer?

Are you using C# Cache class?

Let's see if we can figure it out.

Thanks
Al

"JCauble" wrote:
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.

Nov 19 '05 #10
I am downloading this stuff now. I will look to see what it can find out.
However we have been using the Dev Partner Suite of tools to watch the Heap
and other memory usage and it still does not correlate to what Taskmanager is
saying is being used. Also, neither does the MemoryTest in the sample app
for the debugging stuff.

As an example if you load up the memory page and just keep clicking on the
Refresh stats page you will see the worker process start to consume memory.
even after a free memory command it does not change. It will only grow for a
short time since there is not much on the page but it does grow.

Our applications do not use the Cacheing objects so it does not directly
relate to what we are seeing.

Is it possible that ASP.Net is using Cacheing objects behind the scenes and
it is blowing up the process usage of ram?

Don't know.

"Scott Allen" wrote:
Hi JCauble:

You might want to use the ADPlus utility to get snapshots of the
process before it terminates. This and other tricks are described in
the following document:

http://msdn.microsoft.com/library/en...asp?frame=true
HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 25 Feb 2005 07:43:06 -0800, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
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.


Nov 19 '05 #11
So is the question really about IIS not releaseing or ASP.Net? We cannot
move to Win2003 for several more months and we need to fix the problem now.

Any other thoughts.

Thanks.

"Albert Pascual" wrote:
I had some problems using Windows 2000 with large applications, I moved the
same ASP.NET app to 2003 Enterprise/IIS 6 and memory got released.

Always thought that there was a problem with IIS 5 releasing memory

"JCauble" wrote:
The server is Windows 2000 Server it has 3GB of ram IIS 5, I know it's a dual
processor but not sure what the processors are.

We hope to get Window 2003 Server and IIS6 in place later this year but
that's dosen't help the problem now.

On the client I have a dual Xeon with 1GB of ram on w2K pro. Seeing a
similar issue for memory escelation without release. Even left it running
overnight with no activity and it never cleared up.

We are not using the Cache class. We even tried to tell it to not cache
some of the pages to see what would happen and it did not change anything.

Thanks.

"Albert Pascual" wrote:
Please can you provide more information? Hardware specs will be pretty good
as well as if you are running Windows 2000 or 2003, what version of that
operating system. Running IIS 5 or 6? How much memory on the computer?

Are you using C# Cache class?

Let's see if we can figure it out.

Thanks
Al

"JCauble" wrote:

> 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.

Nov 19 '05 #12
If I were you, I'd open a support incident with Microsoft for something that
complicated. One-on-one interaction would have a better chance - plus they
have tools to help trace problems like yours.

"JCauble" <JC*****@discussions.microsoft.com> wrote in message
news:E7**********************************@microsof t.com...
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.


Nov 19 '05 #13
On Fri, 25 Feb 2005 10:05:50 -0800, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
I am downloading this stuff now. I will look to see what it can find out.
However we have been using the Dev Partner Suite of tools to watch the Heap
and other memory usage and it still does not correlate to what Taskmanager is
saying is being used. Also, neither does the MemoryTest in the sample app
for the debugging stuff.

It can be tough, because different tools have a different
interpretation of "memory usage". There is reserved memory, committed
memory, the working set, and virtual memory. The task manager reports
the size of the working set, which is the sum of all memory pages the
application currently has in physical RAM only.
As an example if you load up the memory page and just keep clicking on the
Refresh stats page you will see the worker process start to consume memory.
even after a free memory command it does not change. It will only grow for a
short time since there is not much on the page but it does grow.

By 'free memory command' do you mean you force a garbage collection?
Our applications do not use the Cacheing objects so it does not directly
relate to what we are seeing.

Is it possible that ASP.Net is using Cacheing objects behind the scenes and
it is blowing up the process usage of ram?


It's always a possibility the cache has gone berserk, but generally
it's a bit smarter than this and at the least would have a graceful
"recycle" and not an unexpected termination.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Nov 19 '05 #14
Well, I am trying to use this SOS / ADPlus thing but it's just not getting me
anywhere is this able to work with .net 1.1. The samples all point out stuff
in the 1.0 framework.

Also, I added the virtual memory item in task manager and noticed that most
of the memory is in the virtual memory object. However when watching perfmon
only about 13 MB was being used mostly in the Gen(0) heap. When garbage
collection fired it cleared out most of it but the worker process did not go
down in size.

The only way I have been able to get it to go down is a recycle.

Thanks.

"Scott Allen" wrote:
On Fri, 25 Feb 2005 10:05:50 -0800, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
I am downloading this stuff now. I will look to see what it can find out.
However we have been using the Dev Partner Suite of tools to watch the Heap
and other memory usage and it still does not correlate to what Taskmanager is
saying is being used. Also, neither does the MemoryTest in the sample app
for the debugging stuff.


It can be tough, because different tools have a different
interpretation of "memory usage". There is reserved memory, committed
memory, the working set, and virtual memory. The task manager reports
the size of the working set, which is the sum of all memory pages the
application currently has in physical RAM only.
As an example if you load up the memory page and just keep clicking on the
Refresh stats page you will see the worker process start to consume memory.
even after a free memory command it does not change. It will only grow for a
short time since there is not much on the page but it does grow.


By 'free memory command' do you mean you force a garbage collection?
Our applications do not use the Cacheing objects so it does not directly
relate to what we are seeing.

Is it possible that ASP.Net is using Cacheing objects behind the scenes and
it is blowing up the process usage of ram?


It's always a possibility the cache has gone berserk, but generally
it's a bit smarter than this and at the least would have a graceful
"recycle" and not an unexpected termination.

--
Scott
http://www.OdeToCode.com/blogs/scott/

Nov 19 '05 #15
We may just do that. With it being a Friday though I'll probably wait until
next week. I figure we will need more time to do some of this analysis.
What I was hoping for was some pointers / info to maybe help eliminate or
shine some light on what we are seeing.

Thanks.

"Ken Cox [Microsoft MVP]" wrote:
If I were you, I'd open a support incident with Microsoft for something that
complicated. One-on-one interaction would have a better chance - plus they
have tools to help trace problems like yours.

"JCauble" <JC*****@discussions.microsoft.com> wrote in message
news:E7**********************************@microsof t.com...
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.


Nov 19 '05 #16
On Fri, 25 Feb 2005 11:11:05 -0800, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
Well, I am trying to use this SOS / ADPlus thing but it's just not getting me
anywhere is this able to work with .net 1.1. The samples all point out stuff
in the 1.0 framework.

Ken has a good suggestion - the MS support people will be able to
help. It's tough to learn these tools on the fly.
Also, I added the virtual memory item in task manager and noticed that most
of the memory is in the virtual memory object. However when watching perfmon
only about 13 MB was being used mostly in the Gen(0) heap. When garbage
collection fired it cleared out most of it but the worker process did not go
down in size.


There is a distinction to make between "total memory usage" and
"amount of free memory in the gen 0 heap". Overall memory usage can
stay consistent while the free heap space size bounces up and down
between collections. In other words, I can clean out my desk drawers
but they still take up the same amount of space in the room - it's
just now they are empty and I can fill them up with vodka bottles
again.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Nov 19 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Tron Thomas | last post by:
Given the following information about memory management in C++: ----- The c-runtime dynamic memory manager (and most other commercial memory...
10
by: eyh5 | last post by:
Hi, My C code (running on Soalris Unix) has some "segmentation fault" that I wish to use purify to do it. I poked around the web, and found some...
18
by: cs | last post by:
This is the function malloc_m() that should be like malloc() but it should find memory leak, and over bound writing in arrays. How many errors do...
23
by: James | last post by:
The following code will create memory leaks!!! using System; using System.Diagnostics; using System.Data; using System.Data.SqlClient; ...
3
by: Florin | last post by:
Hi all, I have a problem related to memory grow on a server application which is basically stateless (I have some static info loaded). The...
2
by: RobbGMelenyk | last post by:
I've got a Windows Service written in C# that is having some unfortunate memory issues. I've been working with .NET MemProfiler and...
17
by: Mike | last post by:
Hello, I have following existing code. And there is memory leak. Anyone know how to get ride of it? function foo has been used in thousands...
27
by: George2 | last post by:
Hello everyone, Should I delete memory pointed by pointer a if there is bad_alloc when allocating memory in memory pointed by pointer b? I am...
22
by: Peter | last post by:
I am using VS2008. I have a Windows Service application which creates Crystal Reports. This is a multi theaded application which can run several...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.