w3wp 应用程序池 IIS 7 的高内存使用率 [英] High memory usage with w3wp application pool IIS 7

查看:24
本文介绍了w3wp 应用程序池 IIS 7 的高内存使用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站应用程序在 IIS 7.0 上它自己的应用程序池中运行.该应用程序是一个 ASP.NET MVC 3 网站.

I have a website application running in it's own application pool on IIS 7.0. The application is an ASP.NET MVC 3 website.

我注意到这个应用程序对应的 w3wp IIS 工作服务的内存使用量相当高(800 MB,有一些波动).

I have noticed the memory usage for this applications corresponding w3wp IIS worker service is quite high ( 800 MB, with some fluctuation ).

我正在尝试诊断问题并尝试了以下方法:

I am trying to diagnose the problem and have tried the following:

我在 IIS 级别禁用了网站的输出页面缓存,然后回收了应用程序池.这会导致 w3wp 进程重新启动.此过程的内存使用量会慢慢增加到大约 800 MB,大约需要 30 秒.目前没有正在处理的页面请求.当我从 IIS 重新启动网站时,进程的内存大小不会改变.

I have disabled output page caching for the website at IIS level and then recycled the application pool. This causes the w3wp process to restart. The memory usage for this process then slowly creeps up to around 800 MB, it takes around 30 seconds to do so. There are no page requests being handled at this time. When I restart the website from IIS the memory size of the process does not alter.

我尝试从 VS 2010 运行应用程序的调试副本,内存使用没有问题.

I have tried running a debug copy of the application from VS 2010, there are no problems with memory usage.

我的一些想法/问题是:

这个问题是否与网站代码有关?- 鉴于在发送/处理任何页面请求之前内存会飙升,我认为这不是代码问题?

Is this problem related to the websites code? - Given that the memory rockets before any page requests have been sent/handled, I would assume this is NOT a code problem?

MVC 内置的应用程序没有写入缓存处理.

The application built in MVC has no handling of caching written into it.

该网站使用实时数据显示,它定期使用ajax请求,并且通常长时间处于打开"状态.

The website uses real-time displaying of data, it uses ajax requests periodically, and is generally left 'open' for long periods of time.

为什么在应用程序被回收并且没有用户请求被发送后内存使用量会猛增?这是因为它正在从磁盘加载旧的缓存信息到它的内存中吗?

Why does the memory usage rocket up after the application is recycled and no user requests are being sent? Is this because it is loading old cache information into it's memory from disk?

应用程序不会崩溃,我只是关心内存使用情况,它不是一个大网站...

The application does NOT crash, I'm just concerned about the memory usage, it is not that big of a website...

任何有助于解决此问题的想法/帮助将不胜感激.

Any ideas/help with getting to the bottom of this problem would be appreciated.

推荐答案

我刚刚查看了我的服务器,我的池使用了 900-1000 MB 虚拟大小内存和 380 MB 工作集.我的网站运行顺畅,没有出现问题已有几年了,我已经检查了各个方面的网站.我的池从不回收,服务器一直运行到下一次更新,并且有 40% 的稳定可用物理内存.

I just looked my server and my pools use 900-1000 MB Virtual size Memory, and 380 MB Working set. My sites run smooth with out problem for some years now, and I have checked the sites from all sides. My pool never recycles and the server runs until the next update continuously with 40% stable free physical memory.

如果您的内存没有持续增长,那么此内存就是代码加上您在应用程序中设置为静态、常量、字符串和可能的缓存的数据.

您可以使用进程资源管理器查看工作和虚拟大小记忆.

You can use process explorer to see the working and the virtual size memory.

您还可以考虑针对您的代码运行配置文件,以查看您是否有任何内存泄漏"或其他问题.从谷歌找一个:https://www.google.com/search?hl=en&q=asp.net+memory+profiler.

You can also think to run a profile against your code to see if you have any "memory leak" or other issue. Find one from google: https://www.google.com/search?hl=en&q=asp.net+memory+profiler.

这篇关于w3wp 应用程序池 IIS 7 的高内存使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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