什么是System.Web.Mvc.MvcHandler.ProcessAsyncRequest()?Web、System、Mvc、ProcessAsyncRequest

2023-09-03 12:36:23 作者:拾荒

我在做一些NewRelic的追踪,以及我看到几乎每一个请求包含调用System.Web.Mvc.MvcHandler.ProcessAsyncRequest()'。

I'm doing some tracing in NewRelic, and I'm seeing almost every single request contains a call to 'System.Web.Mvc.MvcHandler.ProcessAsyncRequest()'.

该函数调用可能需要长达100秒(严重的是,100S)从300毫秒的任何地方。我试图寻找MSDN文档,但没有什么关于http://msdn.microsoft.com/en-us/library/system.web.mvc.mvchandler.aspx

This function call can take anywhere from 300ms up to 100s (seriously, 100s). I tried to search msdn documentation, but there's nothing on http://msdn.microsoft.com/en-us/library/system.web.mvc.mvchandler.aspx

显然,事情是在骗我到这里来。

clearly, something is lying to me here.

我有几个理论,为什么这是需要如此长的:

I have a few theories as to why this is taking so long:

类型推断?我使用structuremap。

type inference? I'm using structuremap.

服务器资源的问题?

.NET版本的某种不兼容?

.net version incompatibility of some sort?

某种asp.net mvc的incomopatibility?

asp.net mvc incomopatibility of some sort?

环境:

.NET 4

asp.net MVC 3

asp.net mvc 3

专用虚拟机

推荐答案

当我发现这个问题,我想一样@garfbradaz并期待通过MVC的来源。这很有趣,因为我发现的没有提及到 ProcessAsyncRequest 方法。

When I found this issue, I thought the same as @garfbradaz and looked through the MVC source. It was interesting, as I found no reference to the ProcessAsyncRequest method.

所以,我决定这可能是一个新的文物进行了注射,或者就像你说的,一个红色的鲱鱼和一些是在骗我们!我换了New Relic关闭,并联系了他们的支持团队。

Hence, I decided it might be something New Relic were injecting, or as you say, a red herring and something is lying to us! I switched New Relic off, and got in touch with their support team.

今天,经过由New Relic的团队极其敏感和有礼貌的成员几封邮件,他们回来给我,证实它是(排序)的错误。这里是他们的回应:

Today, after a few emails from an extremely responsive and courteous member of the New Relic team, they got back to me and confirmed it's a bug (of sorts). Here is their response:

ProcessAsyncRequest是我们使用的任何度量为自定义名称   记录未/未从继承System.Web.UI.Page。   由于MVC视图引擎使用System.Web.Mvc.ViewPage所有这些   指标将根据不正确的New Relic的绰号下降   ProcessAsyncRequest。

ProcessAsyncRequest is a custom name that we use for any metric being recorded that is not / does not inherit from "System.Web.UI.Page." Given that MVC view engine uses "System.Web.Mvc.ViewPage" all of those metrics will incorrectly fall under the New Relic moniker of "ProcessAsyncRequest."

我将工作的一个修改的代理和芯   仪器仪表,希望能聚合这些指标   恰如其分。我很抱歉的混乱和麻烦这有   使你。

I will be working on a modification to the agent and the core instrumentation that will hopefully aggregate these metrics appropriately. I am sorry for the confusion and trouble this has caused you.

我给你一个更新,因为我接近的解决方案。

I'll give you an update as I get close to a solution.

修改:从New Relic的下面进一步响应 - 看起来他们已经制定了修复

EDIT: Further response from New Relic below - looks like they have a fix in place.

我只是推了承诺,这将有助于我们更好地分类的   交易从安装代理来了。

解决Maven导入依赖时出现Cannot resolve org.springframework spring webmvc 5.3.1

I just pushed a commit that will help us better classify the transactions coming from the installed agent.

据我们做了性能问题发现报告的问题   该真棒工程师AppHarbor这是造成TypeLoadExceptions   这可能与慢装载/编译code被放进   缓存。我们已经找到了原因,并在最后的测试阶段   该修补程序和我们都希望能得到修复程序的下一个版本   该代理。

As far as the performance issue we did discover an issue reported by the awesome engineers at AppHarbor that was causing TypeLoadExceptions which might be related to slow loading / compiling code being put into the cache. We have found the cause and are in the final testing phases of that fix and we are hoping to get the fix in the next release of the agent.

从New Relic的尼克优回应这一点,他们的产品已经真正有用的,所以我没有任何不好的感觉,只是觉得我会在这里分享的细节。

Nick from New Relic was excellent in responding to this and their product has been really useful, so I don't have any bad feelings, just thought I'd share the details here.

很高兴找到了有我的MVC应用程序根本没有鬼呢!

Very happy to find out there are no ghosts in my MVC app anyway!

现在我建议任何人有这些问题,是关掉了New Relic,直到他们的下一个版本。

For now my advice to anyone having these problems is switch off New Relic until their next release.

编辑2 :尼克从New Relic的今天给我发电子邮件 - 他们的最新剂(2.0.9.15版) - 现在可用,并且应该解决这个问题。

EDIT 2: Nick from New Relic emailed me today - their latest agent (version 2.0.9.15) - is now available and should fix this issue.