3

I've encountered a problem with IIS.

The problem is the following:

  • Sometimes (intermittent issue) IIS hangs a request in a state called ExecuteRequestHandler, and it spends ~85% of the time.

I couldn't figure out why. Tried everything what I've found in forums, nothing helped. I'm using azure for my backend server and another azure server I have my database.

enter image description here

Can somebody explain what exactly this ExecuteRequestHandler step in a request lifecycle?

I didn't find a good explanation about what this step is doing. Is it executing my code already or is it a pre-task in the lifecycle? The reason I'm asking it to be able to detect where the problem is.

halfer
  • 19,824
  • 17
  • 99
  • 186
Iamisti
  • 1,680
  • 15
  • 30
  • This question is duplicated already - http://stackoverflow.com/questions/38131559/web-api-requests-queueing-up-forever-on-iis-in-state-executerequesthandler – Andy Shen Apr 04 '17 at 07:27

1 Answers1

1

That's when the application code executes.

When it receives a request, IIS creates an IRequest object to represent it, and also creates an IHttpHandler to handle it, the exact class depending on the technology (DefaultHttpHandler, MvcHandler, ...).

There are many steps to completely handle a request, the core one being the HttpApplication.CallHandlerExecutionStep.Execute method calling ProcessRequest on the IHttpHandler.

Philippe
  • 1,225
  • 7
  • 9
  • thank you man! Was looking around for the documentation but haven't find the right one which explains things like you did. Do you have any link to a relevant documentation? – Iamisti Apr 10 '17 at 06:04
  • Sorry, no. It's from personal knowledge, and I check the exact code with Reflector. – Philippe Apr 10 '17 at 06:06
  • Digging into my gard drive, I found http://cdn.nitrix-reloaded.com/publicdocs/asp.net_life_cycle_cheatsheet.pdf and http://www.dotnetcurry.com/aspnet/747/http-request-lifecycle-events-iis-pipeline-aspnet. – Philippe Apr 10 '17 at 06:35
  • Thanks! Appreciated! – Iamisti Apr 10 '17 at 16:12