TransferRequestHandler和BeginRequest的性能问题 [英] Performance issues with TransferRequestHandler and BeginRequest

查看:109
本文介绍了TransferRequestHandler和BeginRequest的性能问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始使用New Relic来监视,但是我实际上已经尝试替换了会话模块,但这无济于事.

该站点是ASP.NET MVC和Webforms的混合体.

我已经意识到这是一个漫长的过程,您没有什么可以继续下去"的,但是如果有人可以让我朝正确的方向前进,最重要的是能够在本地重现这种行为或类似的东西,将不胜感激:)

解决方案

BeginRequest是一切开始的地方,因此通常会有延迟,但是您必须更深入地查找使代码变得更实际的点.延迟.

如果出现会话问题,请在用户执行长时间的操作(例如下载文件或使页面长时间停留的程序复杂化)时禁用会话.

相对于会话:
调用aspx页面以随机方式缓慢返回图像
ASP.NET Server不会异步处理页面
试图使Web方法异步
在处理另一个Web应用程序时该Web应用程序被阻止共享同一会话
哪些perfmon计数器可用于识别ASP.NET瓶颈??
完全替换ASP.Net的会话

下一步是进行完全自定义的会话.

现在,如果您使用多个池(网络花园)来运行站点,它可能会有所帮助,但是在此之前,您必须确保您已正确同步数据,并使用Mutex和其他锁定机制在多站点上运行泳池环境.

I have started to use New Relic to monitor the performance of http://alternativeto.net that is a fairly large website.

What I've noticed is that a significant time is spent in a method they report as "TransferRequestHandler" and when i dive into it i see that it's really the "BeginRequest()" method that is taking time.

It looks like this in New Relic.

The closest thing I've come to find anything that could be the problem is this thread here on Stack Overflow I just discovered why all ASP.Net websites are slow, and I am trying to work out what to do about it but i've actually tried to replace the Session Module but that didn't help.

The site is a hybrid between ASP.NET MVC and Webforms.

I've realized that this is a long shot and you don't have much to "go on" but if someone can put me in the right direction and most importantly be able to reproduce the behavior locally or something like that i would be extremely grateful :)

解决方案

The BeginRequest is the place that everything starts, so its normally there to be the delay but you must go deeper to find the actually point of your code that makes the delay.

If the session is the issue, then disable the session when the user make long actions, like download a file, or complicate procedures that the page stuck for long time.

relative to session:
call aspx page to return an image randomly slow
ASP.NET Server does not process pages asynchronously
Trying to make Web Method Asynchronous
Web app blocked while processing another web app on sharing same session  
What perfmon counters are useful for identifying ASP.NET bottlenecks?  
Replacing ASP.Net's session entirely  

The next step is to make a totally custom session.

Now, its may help if you use more than one pool (web garden) to run your site, but before do that you must be sure that you have correct synchronize your data and use Mutex and other locking mechanism for run on multi pool environment.

这篇关于TransferRequestHandler和BeginRequest的性能问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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