title: First Web API session request is very slow
body: <p>I'm writing an ASP.NET Web API application hosted on IIS7 (no special configuration).</p>
  
  <p>My problem is that for each first request (on a new machine/new browser/after a while...) there is a long delay - even on requests that return constants!</p>
  
  <p>I've read about "warming up" scripts but it's not the issue here. It seems like the web server is trying to create a session and it takes very long time.  Any suggestions?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I think the delay is caused by worker-process creation for each new session. Now the question is why is it so slow, and why doesn't the web server reuse living worker-processes to serve requests?</p>
  
  <p>I have configured the application pool to limit worker processes to 5 with no timeout (set to 0). This caused the first five sessions to be slow on first requests (which I can live with) and now the worker processes are alive. But surprisingly, from time to time, the request is slow again!</p>