Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance issues with TransferRequestHandler and BeginRequest

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.

http://content.screencast.com/users/stuckish/folders/Jing/media/22c8137e-21b1-4b36-8185-15989e173f57/2012-10-30_0941.png

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 :)

like image 757
Olaj Avatar asked Oct 30 '12 08:10

Olaj


1 Answers

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.

like image 179
Aristos Avatar answered Nov 18 '22 20:11

Aristos