title: The operation was canceled. at System.Threading.CancellationToken.ThrowIfCancellationRequested()
body: <p>I am using latest version of WebAPI. My WebAPI return RSS feed data. I did a load testing with blitz and below are its results.</p>
  
  <blockquote>
    <p>This rush generated 115,908 successful hits in 300 seconds and we
    transferred 1.91 GB of data in and out of your app. The average hit
    rate of 386.36/second translates to about 33,381,504 hits/day. The
    average response time was 410 ms. You've got bigger problems, though:
    0.87% of the users during this rush experienced timeouts or errors!</p>
  </blockquote>
  
  <p>The Code for WebAPI which returns RSS is as below. It uses OutPutCache lib from <a href="https://github.com/filipw/AspNetWebApi-OutputCache" rel="nofollow">https://github.com/filipw/AspNetWebApi-OutputCache</a></p>
  
  <pre><code>[AllowAnonymous]
          [CacheOutput(ServerTimeSpan = 14400)]
          [HttpGet]
          public async Task&lt;HttpResponseMessage&gt; GetRssData()
          {
  
              string responseFromServer = string.Empty;
              WebRequest request = WebRequest.Create("URL FOR MY RSS FEED HERE");
  
  
              using (WebResponse response = await request.GetResponseAsync())
              {
                  using (Stream dataStream = response.GetResponseStream())
                  {
                      using (StreamReader reader = new StreamReader(dataStream))
                      {
                          responseFromServer = await reader.ReadToEndAsync();
                      }
                  }
              }
  
              return new HttpResponseMessage() { Content = new StringContent(responseFromServer, Encoding.UTF8, "application/rss+xml") };
  
          }
  </code></pre>
  
  <p><strong>Below is the error log for same</strong></p>
  
  <blockquote>
    <p>Exception information: 
        Exception type: OperationCanceledException 
        Exception message: The operation was canceled.    at System.Threading.CancellationToken.ThrowIfCancellationRequested()<br>
    at
    System.Web.Http.WebHost.HttpControllerHandler.d__1b.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---    at
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)    at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)    at
    System.Web.Http.WebHost.HttpControllerHandler.d__7.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---    at
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)    at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)    at
    System.Web.Http.WebHost.HttpControllerHandler.d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---    at
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)    at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)    at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)    at
    System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult
    ar)</p>
    
    <p>Thread information: </p>
  
  <pre><code>Stack trace:    at System.Threading.CancellationToken.ThrowIfCancellationRequested()   
  </code></pre>
    
    <p>at
    System.Web.Http.WebHost.HttpControllerHandler.d__1b.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---    at
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)    at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)    at
    System.Web.Http.WebHost.HttpControllerHandler.d__7.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---    at
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)    at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)    at
    System.Web.Http.WebHost.HttpControllerHandler.d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---    at
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)    at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)    at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)    at
    System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult
    ar)</p>
  </blockquote>