工作进程回收,因为它达到了其虚拟内存限制达到了、因为它、虚拟内存、进程

2023-09-04 00:44:36 作者:感情你情我愿i

我们举办一个相当大的(自写)ASP.NET网站为我们的客户。它包括一个Web服务,网站和图像服务的网站,这三个在自己的虚拟目录。这三个虚拟目录是集中在一个应用程序池。该池有设置为500兆字节两种内存限制(最大虚拟内存和最大使用的内存)。

We host a rather large (self written) ASP.NET website for our customers. It consists of a web service, a web site and a image serving web site, all three in their own virtual directory. The three virtual directories are together in one application pool. The pool has both memory limits (maximum virtual memory and maximum used memory) set to 500 megabytes.

然而,应用程序池受到很多再循环,即使只有一次一个用户。 事件日志消息说:

However, the application pool suffers many recycles, even with only one user at a time. The eventlog message says:

一个工作进程XXXX服务应用程序池XXXX已请求回收,因为它已经达到其虚拟内存限制。

A worker process with process id of 'xxxx' serving application pool 'xxxx' has requested a recycle because it reached its virtual memory limit.

不过,观察工作进程的Process Explorer显示任何支持此消息。我应该看哪个专柜看到,实际上是受到这两个设置内存?

However, observing the worker process with Process Explorer shows nothing that supports this message. Which counters should I watch to observe the memory that is in fact limited by both settings?

更新1

五合一进程在任务管理器中显示内存使用大约100 MB和VM大小,仍是进程被回收上述消息。 5 GB的物理服务器上可用的内存...

Observing the process in Task Manager shows a 'mem usage' and 'vm size' of around 100 MB, still the process is recycled with the above message. 5 GB physical memory available on the server...

更新2

虽然网站是相当大的,问题集中在应用的一小部分。它执行一个查询(使用Oracle)和结合的结果,一个GridView和Repeater三夏。结果由一个简短描述和图标(通过图像服务网站加载)。如果我以后对方进行10个搜索行动,每一种有9项结果,在工作过程中显示内存使用和虚拟机的大小约为100 MB并回收...

Although the web site is rather large, the problem concentrates in a small portion of the application. It executes a query (using Oracle) and binds the results to a gridview and repeater webcontrol. The results consists of a short description and an icon (loaded through the image serving web site). If I execute 10 search actions after each other, each giving 9 results, the work process shows mem usage and vm size of around 100 MB and recycles...

更新3 图像服务网站的使用情况的切换不会导致更好的结果。所以我觉得说,这个问题是别的东西它是公平的。

Update 3 Switching of the usage of the image serving web site does not result in better results. So I think it is fair to say that the problem is something else.

推荐答案

只是作为一个观察... 如果你的形象服务的网站正好做任何内嵌图像处理/生成,可以快速吞噬内存没有要求的Dispose()上的任何可支配的资源 - 特别是那些在包装机功能...

Just as an observation... If your "image serving" site happens to do any inline image processing/generation, you can quickly swallow up memory by not calling Dispose() on any disposable resources - particularly those that are wrapping native functionality...

这不是直接回答你的问题,但它可能有助于寻找到是导致猖獗的内存使用的基本问题。

It's not a direct answer to your question, but it might help to look into the underlying problem that is causing the rampant memory use.