ASP.Net内存使用问题疑难解答? [英] Troubleshooting ASP.Net memory usage issues?

查看:64
本文介绍了ASP.Net内存使用问题疑难解答?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我负责运行我们的生产

ASP.Net应用程序的一对IIS 6网络服务器。我们按月推送代码,大约两周后,在我们10月代码推送后,我们开始遇到偶尔的网络服务器

错误。

应用程序池配置为以域用户身份运行,该用户对Web代码具有

权限。当我们遇到问题时,网络服务器将返回

ASP.Net服务器应用程序不可用。页面,我们的应用程序池内存

使用率非常高(我们正常使用的2到4倍)。非

asp.net内容提供得很好。如果我回收应用程序池

或做一个iisreset,内存使用率会恢复正常,并且网站会再次启动




事件日志或http错误日志中没有记录任何内容,我们的应用程序中看到的唯一错误是偶然的类型异常

System.OutOfMemoryException被扔了。每个

时间都没有错误,我看到的函数抛出异常是非常通用的,并且在整个应用程序中大量使用了
(或者左右)我们的开发人员告诉我/ b $ b me)。我们的应用程序甚至不会在每次发生错误时都记录错误。


我应该如何解决此问题?我们的开发人员说它是一个

服务器问题,但我倾向于代码问题。这些服务器是运行Windows 2003 Server标准的
,在上周末完全更新。

I''m responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two weeks
after our October code push, we started to run into occasional webserver
errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will return
the ASP.Net "Server Application Unavailable" page, and our app pool memory
usage is really high (anywhere from 2 to 4 times our normal usage). Non
asp.net content is served up just fine. If I recycle the application pool
or do an iisreset, memory usage drops back to normal and the site starts
working again.

Nothing is logged to the eventlog or http error log, and the only errors we
see from our application has been the occasional "Exception of type
System.OutOfMemoryException was thrown." The same page doesn''t error every
time, and the function I''ve seen throw exceptions is incredibly generic and
used heavily throughout our entire application (or so our devs have told
me). Our application doesn''t even log an error every time this has
happened.

How should I go about troubleshooting this? Our devs are saying it''s a
server issue, but I''m leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last weekend.

推荐答案

你正在使用什么会话管理。 InProc会话是主要内存

消费者。


-

Eliyahu Goldin,

软件开发人员

Microsoft MVP [ASP.NET]
http:/ /msmvps.com/blogs/egoldin
http://usableasp.net

Daniel Peterson < py **** @ hotmail.comwrote in message

news:CB ************************** ******** @ microsof t.com ...
What session management are you using. InProc sessions are major memory
consumers.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Daniel Peterson" <py****@hotmail.comwrote in message
news:CB**********************************@microsof t.com...

我负责运行我们生产的一对IIS 6网络服务器

ASP.Net应用程序。我们按月推送代码,大约两周后,在我们10月代码推送后,我们开始遇到偶尔的网络服务器

错误。

应用程序池配置为以域用户身份运行,该用户对Web代码具有

权限。当我们遇到问题时,网络服务器将返回ASP.Net服务器应用程序不可用。页面,我们的应用程序池

内存使用率非常高(我们正常使用的2到4倍)。

非asp.net内容服务很好。如果我回收应用程序

池或执行iisreset,内存使用率会恢复正常,并且网站

重新开始工作。


事件日志或http错误日志中没有记录任何内容,我们从应用程序中看到的唯一错误

偶尔出现类型异常

System.OutOfMemoryException被扔了。同样的页面每次都没有错误

,我看到的函数抛出异常令人难以置信的b / b
泛型并在整个应用程序中大量使用(或者我们的开发人员

告诉我)。每次发生这个

时,我们的应用程序甚至都不会记录错误。


我应该如何解决此问题?我们的开发人员说它是一个

服务器问题,但我倾向于代码问题。这些服务器是运行Windows 2003 Server标准的
,在上周末完全更新了

周末。
I''m responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two weeks
after our October code push, we started to run into occasional webserver
errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will
return the ASP.Net "Server Application Unavailable" page, and our app pool
memory usage is really high (anywhere from 2 to 4 times our normal usage).
Non asp.net content is served up just fine. If I recycle the application
pool or do an iisreset, memory usage drops back to normal and the site
starts working again.

Nothing is logged to the eventlog or http error log, and the only errors
we see from our application has been the occasional "Exception of type
System.OutOfMemoryException was thrown." The same page doesn''t error
every time, and the function I''ve seen throw exceptions is incredibly
generic and used heavily throughout our entire application (or so our devs
have told me). Our application doesn''t even log an error every time this
has happened.

How should I go about troubleshooting this? Our devs are saying it''s a
server issue, but I''m leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last
weekend.



嗨丹尼尔,


这是一个代码问题。这可能是以下两个原因之一:1。内存泄漏。

是的,.Net应用程序可能会泄漏内存,如果他们使用非托管资源,那么
没有正确处理。 2.内存碎片。如果重新使用同一块

内存,例如,在很长一段时间内添加和删除

成员的应用程序级集合,内存可以变成碎片,需要分配更多的内存来创建连续的

块。如果需要的话。


-

HTH,


Kevin Spencer

鸡肉沙拉外科医生

Microsoft MVP


" Daniel Peterson" < py **** @ hotmail.comwrote in message

news:CB ************************** ******** @ microsof t.com ...
Hi Daniel,

It''s a code issue. It will be one of 2 possible reasons: 1. Memory Leak.
Yes, .Net applications can leak memory, if they use unmanaged resources that
are not disposed properly. 2. Memory Fragmentation. If the same block of
memory is re-used as, for example, an application-level collection that has
members added and removed over a long period of time, that memory can become
fragmented, necessitating the allocation of more memory to create contiguous
blocks when they are needed.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Daniel Peterson" <py****@hotmail.comwrote in message
news:CB**********************************@microsof t.com...

我负责运行我们生产的一对IIS 6网络服务器

ASP.Net应用程序。我们按月推送代码,大约两周后,在我们10月代码推送后,我们开始遇到偶尔的网络服务器

错误。

应用程序池配置为以域用户身份运行,该用户对Web代码具有

权限。当我们遇到问题时,网络服务器将返回ASP.Net服务器应用程序不可用。页面,我们的应用程序池

内存使用率非常高(我们正常使用的2到4倍)。

非asp.net内容服务很好。如果我回收应用程序

池或执行iisreset,内存使用率会恢复正常,并且网站

重新开始工作。


事件日志或http错误日志中没有记录任何内容,我们从应用程序中看到的唯一错误

偶尔出现类型异常

System.OutOfMemoryException被扔了。同样的页面每次都没有错误

,我看到的函数抛出异常令人难以置信的b / b
泛型并在整个应用程序中大量使用(或者我们的开发人员

告诉我)。每次发生这个

时,我们的应用程序甚至都不会记录错误。


我应该如何解决此问题?我们的开发人员说它是一个

服务器问题,但我倾向于代码问题。这些服务器是运行Windows 2003 Server标准的
,在上周末完全更新了

周末。
I''m responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two weeks
after our October code push, we started to run into occasional webserver
errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will
return the ASP.Net "Server Application Unavailable" page, and our app pool
memory usage is really high (anywhere from 2 to 4 times our normal usage).
Non asp.net content is served up just fine. If I recycle the application
pool or do an iisreset, memory usage drops back to normal and the site
starts working again.

Nothing is logged to the eventlog or http error log, and the only errors
we see from our application has been the occasional "Exception of type
System.OutOfMemoryException was thrown." The same page doesn''t error
every time, and the function I''ve seen throw exceptions is incredibly
generic and used heavily throughout our entire application (or so our devs
have told me). Our application doesn''t even log an error every time this
has happened.

How should I go about troubleshooting this? Our devs are saying it''s a
server issue, but I''m leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last
weekend.



我们正在使用会话状态db。


" Eliyahu Goldin" < RE ************************** @ mMvVpPsS.org写在

消息新闻:e0 **** ********** @ TK2MSFTNGP06.phx.gbl ...
We''re using the session state db.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:e0**************@TK2MSFTNGP06.phx.gbl...

您正在使用哪种会话管理。 InProc会话是主要内存

消费者。


-

Eliyahu Goldin,

软件开发人员

Microsoft MVP [ASP.NET]
http:/ /msmvps.com/blogs/egoldin
http://usableasp.net


Daniel Peterson < py **** @ hotmail.comwrote in message

news:CB ************************** ******** @ microsof t.com ...
What session management are you using. InProc sessions are major memory
consumers.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Daniel Peterson" <py****@hotmail.comwrote in message
news:CB**********************************@microsof t.com...

>我负责运行我们的生产的一对IIS 6网络服务器
ASP.Net应用程序。我们按月推送代码,在10月代码推送后大约两周,我们开始偶尔遇到网页服务器错误。

应用程序池配置为运行作为对Web代码具有
权限的域用户。当我们遇到问题时,网络服务器将返回ASP.Net服务器应用程序不可用。页面和我们的应用程序
池内存使用率非常高(我们正常使用的时间是2到4倍)。非asp.net内容提供得很好。如果我回收
应用程序池或执行iisreset,内存使用率将恢复正常,并且该站点将再次开始工作。

没有记录到事件日志或http错误日志,我们从我们的应用程序中看到的唯一错误是偶尔的类型异常
System.OutOfMemoryException被抛出。同一页面每次都没有错误,并且我看到的函数抛出异常是令人难以置信的通用并在整个应用程序中大量使用(或者我们的开发人员告诉我们)我)。我们的应用程序每次都没有记录错误
这已经发生了。

我应该如何解决这个问题呢?我们的开发人员说它是服务器问题,但我倾向于代码问题。这些服务器运行Windows 2003 Server标准,在最后一个周末完全更新。
>I''m responsible for a pair of IIS 6 webservers that run our production
ASP.Net application. We push code on a monthly basis, and about two
weeks after our October code push, we started to run into occasional
webserver errors.

The application pool is configured to run as a domain user which has
permissions to the web code. When we have issues, the webserver will
return the ASP.Net "Server Application Unavailable" page, and our app
pool memory usage is really high (anywhere from 2 to 4 times our normal
usage). Non asp.net content is served up just fine. If I recycle the
application pool or do an iisreset, memory usage drops back to normal and
the site starts working again.

Nothing is logged to the eventlog or http error log, and the only errors
we see from our application has been the occasional "Exception of type
System.OutOfMemoryException was thrown." The same page doesn''t error
every time, and the function I''ve seen throw exceptions is incredibly
generic and used heavily throughout our entire application (or so our
devs have told me). Our application doesn''t even log an error every time
this has happened.

How should I go about troubleshooting this? Our devs are saying it''s a
server issue, but I''m leaning towards a code issue. These servers are
running Windows 2003 Server standard, fully updated as of this last
weekend.



这篇关于ASP.Net内存使用问题疑难解答?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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