简体   繁体   English

垃圾收集似乎未在ASP.net MVC应用程序池上运行

[英]Garbage Collection doesn't seem to be running on ASP.net MVC Application Pool

I am having some weird issues with ASP.NET 4.5 garbage collection and any knowledge or guidance is appreciated. 我在使用ASP.NET 4.5垃圾收集时遇到了一些奇怪的问题,任何知识或指导都值得赞赏。

I recently deployed a new web site about 2 weeks ago. 我最近在大约2周前部署了一个新网站。 When the site's application pool wakes up or recycled, the w3wp.exe memory will jump up to 500-600 MB and stay there. 当站点的应用程序池唤醒或回收时,w3wp.exe内存将跳至500-600 MB并停留在该位置。 I've let it set for 10 to 20 minutes before I run GC.Collect() manually, and the w3wp.exe memory will instantly drop to 100-150 MB. 在手动运行GC.Collect()之前,我将其设置为10到20分钟,而w3wp.exe内存将立即下降到100-150 MB。

The server is Windows Server 2012, running IIS 8. The project is ASP.NET 4.5 MVC. 该服务器是运行IIS 8的Windows Server2012。该项目是ASP.NET 4.5 MVC。

Is this normal behavior or is there something I'm missing? 这是正常现象还是我缺少了什么?

UPDATE: This box only has 4 GB or ram and I know it needs more, but I don't make those decisions. 更新:此盒只有4 GB或ram,我知道它需要更多,但我没有做出这些决定。 I am trying to work with what I have. 我正在尝试使用现有的东西。 We have about 8 other web sites running on this box. 我们在此框中运行着大约8个其他网站。 Most of them are small sites and run at 100 MB or less. 它们中的大多数都是小型站点,运行时大小为100 MB或更少。 We have a larger application also on this box which runs around 1600 MB. 我们在这个盒子上也有一个更大的应用程序,它运行大约1600 MB。

This is not unusual IMO. 这不是不常见的IMO。 Essentially your application pool is building up all your in memory classes,caches etc. It is also compiling your pages on demand as they go. 本质上,您的应用程序池正在构建您的所有内存类,缓存等。它还可以按需编译页面。 I am not sure how you are running your garbage collection on a production deploy while the app is running but unless the memory just keeps running, likely this is just the size of your app. 我不确定在应用程序运行时如何在生产部署上运行垃圾回收,但是除非内存一直保持运行,否则可能只是应用程序的大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM