ASPNET 1.1内存问题/泄漏或堆问题 [英] ASPNET 1.1 Memory Issues / Leak or heap problems

查看:57
本文介绍了ASPNET 1.1内存问题/泄漏或堆问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个大型的Asp.net应用程序,目前正在崩溃我们的生产

服务器。我们看到的是aspnet_wp占用了大量的内存,然后是b $ b然后意外停止。不回收。


示例:

大约5个小时后,大约150个用户的并发用户群

应用程序引发aspnet_wp的内存使用量接近500MB。如果我们的服务器

家伙修改了web.config,那么这个数据就会被释放,而且这个工作进程会回到可管理的内存量。


我们做了什么:

我们一直在使用DevPartner工作室进行内存分析和代码审查

以及CLR Profiler和一些Perfmon计数器。一切都在显示

对于单个用户而言,该应用程序仅使用大约1 MB的ram和

临时对象峰值高达25 mb正在收集。我们已经扫描了我们的代码添加了dispose,并且可以使用close方法扫描
。所有东西

看起来至少对我们的眼睛和工具眼睛都很好。


不知道还有什么。我们认为它可能是大型对象堆但是不确定。此外,我们正在使用SQL Session状态,如果这有任何区别。


为了帮助复制这个问题,我们创建了几个简单的页面

事情有两种方式。


1.有一个空白页面,在其页面中加载一个嵌套的for循环,使用

a string builder创建一个3列宽,20行深的表。然后使用

a response.write推送到屏幕。


2.有另一个页面执行相同的操作,但使用服务器端html

table(< ASP:Table>)对象创建相同的结构。


我们看到的是当我们多次刷新工作进程时

稳定几秒钟然后开始爆炸大约200KB

块大约20MB的额外内存消耗。离开它后空闲了大约15分钟左右它仍然消耗了那个记忆。如果我们使用手动GC运行相同的

页面。收集它仍然会增长但不会增长。


如果我们添加了GC.GetTotalMemUsage(真的)方法调用我们看到内存

的使用情况通常保持相当一致。


我们所看到的可能类似于我们所获得的内容

我们的应用程序。


我们缺少什么?我们真的需要这方面的帮助。

另外,我认为我们的服务器有.net的最新服务器包和

Win2KServer。


我们在客户端机器上也看到了同样的行为

ide。


我们正试图解决这个问题,因为我们正在准备发布一个更大的应用程序,它将拥有大约500-600个并发用户,而且我们也不希望b $ b希望它一直崩溃。


有一件事很奇怪,在perfmon设置所有.net

内存和asp.net计数器时,甚至没有任何东西接近显示内存

使用任务管理器报告内存消耗的使用情况(即使总计)。

据说这是它的结果???????


我们也一直在运行一些内存泄漏分析,发现我们已经有了b $ ba $ minor包含大约150KB的漏洞。我说包含因为基于每个用户

我们从来没有能够让它超越那个...


人们可以提供任何帮助很棒。

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.

推荐答案

请您提供更多信息?硬件规格将非常好

以及如果您运行的是Windows 2000或2003,那么

操作系统的版本。运行IIS 5或6?计算机上有多少内存?


您使用的是C#Cache类吗?


让我们看看能否解决这个问题。


谢谢

Al


" JCauble"写道:
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:
我们有一个大型的Asp.net应用程序,目前正在崩溃我们的生产服务器。我们看到的是aspnet_wp占用了大量内存,然后意外停止。不回收。

示例:
大约5个小时后,大约150个用户的并发用户群,
应用程序将aspnet_wp内存使用量提高了近500MB。如果我们的服务器
家伙修改了web.config,那么这些数据就会被释放,并且工作进程会恢复到可管理的内存量。

我们做了什么:
我们一直在使用DevPartner工作室进行内存分析和代码审查
以及CLR Profiler和一些Perfmon计数器。一切都在显示,对于单个用户,该应用程序仅使用大约1 MB的ram,其中临时对象峰值高达25 mb,这些峰值正在被收集。我们已经扫描了我们的代码,添加了dispose,并且可以使用close方法。至少对我们的眼睛和工具眼睛来说,一切看起来都很好。

不知道还有什么。我们认为它可能是大型对象堆但不确定。此外,如果有任何不同,我们正在使用SQL Session状态。

为了帮助复制这个问题,我们创建了几个简单的页面,它们可以通过多种方式完成任务。 1.有一个空白页面,在其页面中加载了一个嵌套的for循环,它使用一个字符串生成器创建一个3列宽,20行深的表。然后使用
一个response.write来推送到屏幕。

2.有另一个页面做同样的事情,但使用服务器端html
表(< ASP:表>)对象创建相同的结构。

我们看到的是,当我们刷新很多次工作进程时,它会稳定几秒然后开始吹大约200KB的块大约需要20MB的额外内存消耗。在闲置了大约15分钟左右之后它仍然消耗了那段记忆。如果我们使用手动GC运行相同的页面。收集它仍然会增长但不会增长。

如果我们添加了GC.GetTotalMemUsage(true)方法调用,我们看到了记忆
用法通常保持相当一致。

我们所看到的可能类似于我们的应用程序中的内容。

有没有我们缺少的东西?我们真的需要这方面的帮助。
另外,我认为我们的服务器有.net和
Win2KServer的最新服务器包。

我们在客户端也看到了同样的行为运行时的机器

我们正试图解决这个问题,因为我们正准备发布一个更大的应用程序,它将拥有大约500-600个并发用户而且我们也不希望它一直崩溃。

有一点很奇怪就是在perfmon设置所有.net
内存和asp时.net计数器甚至没有显示任务管理器正在报告内存消耗的内存使用情况(即使总计)。
据说这是它会去的???????? br />
我们一直在运行一些内存泄漏分析,发现我们有一个轻微的泄漏,大约150KB。我说包含是因为在每个用户的基础上我们永远无法让它超越那个......

人们可以提供的任何帮助都会很棒。
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.



请您提供更多信息?硬件规格将非常好

以及如果您运行的是Windows 2000或2003,那么

操作系统的版本。运行IIS 5或6?计算机上有多少内存?


您使用的是C#Cache类吗?


让我们看看能否解决这个问题。


谢谢

Al


" JCauble"写道:
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:
我们有一个大型的Asp.net应用程序,目前正在崩溃我们的生产服务器。我们看到的是aspnet_wp占用了大量内存,然后意外停止。不回收。

示例:
大约5个小时后,大约150个用户的并发用户群,
应用程序将aspnet_wp内存使用量提高了近500MB。如果我们的服务器
家伙修改了web.config,那么这些数据就会被释放,并且工作进程会恢复到可管理的内存量。

我们做了什么:
我们一直在使用DevPartner工作室进行内存分析和代码审查
以及CLR Profiler和一些Perfmon计数器。一切都在显示,对于单个用户,该应用程序仅使用大约1 MB的ram,其中临时对象峰值高达25 mb,这些峰值正在被收集。我们已经扫描了我们的代码,添加了dispose,并且可以使用close方法。至少对我们的眼睛和工具眼睛来说,一切看起来都很好。

不知道还有什么。我们认为它可能是大型对象堆但不确定。此外,如果有任何不同,我们正在使用SQL Session状态。

为了帮助复制这个问题,我们创建了几个简单的页面,它们可以通过多种方式完成任务。 1.有一个空白页面,在其页面中加载了一个嵌套的for循环,它使用一个字符串生成器创建一个3列宽,20行深的表。然后使用
一个response.write来推送到屏幕。

2.有另一个页面做同样的事情,但使用服务器端html
表(< ASP:表>)对象创建相同的结构。

我们看到的是,当我们刷新很多次工作进程时,它会稳定几秒然后开始吹大约200KB的块大约需要20MB的额外内存消耗。在闲置了大约15分钟左右之后它仍然消耗了那段记忆。如果我们使用手动GC运行相同的页面。收集它仍然会增长但不会增长。

如果我们添加了GC.GetTotalMemUsage(true)方法调用,我们看到了记忆
用法通常保持相当一致。

我们所看到的可能类似于我们的应用程序中的内容。

有没有我们缺少的东西?我们真的需要这方面的帮助。
另外,我认为我们的服务器有.net和
Win2KServer的最新服务器包。

我们在客户端也看到了同样的行为运行时的机器

我们正试图解决这个问题,因为我们正准备发布一个更大的应用程序,它将拥有大约500-600个并发用户而且我们也不希望它一直崩溃。

有一点很奇怪就是在perfmon设置所有.net
内存和asp时.net计数器甚至没有显示任务管理器正在报告内存消耗的内存使用情况(即使总计)。
据说这是它会去的???????? br />
我们一直在运行一些内存泄漏分析,发现我们有一个轻微的泄漏,大约150KB。我说包含是因为在每个用户的基础上我们永远无法让它超越那个......

人们可以提供的任何帮助都会很棒。
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.



请您提供更多信息?硬件规格将非常好

以及如果您运行的是Windows 2000或2003,那么

操作系统的版本。运行IIS 5或6?计算机上有多少内存?


您使用的是C#Cache类吗?


让我们看看能否解决这个问题。


谢谢

Al

" JCauble"写道:
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:
我们有一个大型的Asp.net应用程序,目前正在崩溃我们的生产服务器。我们看到的是aspnet_wp占用了大量内存,然后意外停止。不回收。

示例:
大约5个小时后,大约150个用户的并发用户群,
应用程序将aspnet_wp内存使用量提高了近500MB。如果我们的服务器
家伙修改了web.config,那么这些数据就会被释放,并且工作进程会恢复到可管理的内存量。

我们做了什么:
我们一直在使用DevPartner工作室进行内存分析和代码审查
以及CLR Profiler和一些Perfmon计数器。一切都在显示,对于单个用户,该应用程序仅使用大约1 MB的ram,其中临时对象峰值高达25 mb,这些峰值正在被收集。我们已经扫描了我们的代码,添加了dispose,并且可以使用close方法。至少对我们的眼睛和工具眼睛来说,一切看起来都很好。

不知道还有什么。我们认为它可能是大型对象堆但不确定。此外,如果有任何不同,我们正在使用SQL Session状态。

为了帮助复制这个问题,我们创建了几个简单的页面,它们可以通过多种方式完成任务。 1.有一个空白页面,在其页面中加载了一个嵌套的for循环,它使用一个字符串生成器创建一个3列宽,20行深的表。然后使用
一个response.write来推送到屏幕。

2.有另一个页面做同样的事情,但使用服务器端html
表(< ASP:表>)对象创建相同的结构。

我们看到的是,当我们刷新很多次工作进程时,它会稳定几秒然后开始吹大约200KB的块大约需要20MB的额外内存消耗。在闲置了大约15分钟左右之后它仍然消耗了那段记忆。如果我们使用手动GC运行相同的页面。收集它仍然会增长但不会增长。

如果我们添加了GC.GetTotalMemUsage(true)方法调用,我们看到了记忆
用法通常保持相当一致。

我们所看到的可能类似于我们的应用程序中的内容。

有没有我们缺少的东西?我们真的需要这方面的帮助。
另外,我认为我们的服务器有.net和
Win2KServer的最新服务器包。

我们在客户端也看到了同样的行为运行时的机器

我们正试图解决这个问题,因为我们正准备发布一个更大的应用程序,它将拥有大约500-600个并发用户而且我们也不希望它一直崩溃。

有一点很奇怪就是在perfmon设置所有.net
内存和asp时.net计数器甚至没有显示任务管理器正在报告内存消耗的内存使用情况(即使总计)。
据说这是它会去的???????? br />
我们一直在运行一些内存泄漏分析,发现我们有一个轻微的泄漏,大约150KB。我说包含是因为在每个用户的基础上我们永远无法让它超越那个......

人们可以提供的任何帮助都会很棒。
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.



这篇关于ASPNET 1.1内存问题/泄漏或堆问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆