title: Azure AppService Performance Issue
body: <p>We have ASP.Net Core 2.1 Web API hosted in AppService (S1) that talks to Azure SQL DB (S1-20DTUs). Both are in same region. During load testing we found that some API instances are taking too much time to return the result. </p>
  
  <p>We tried to troubleshoot the performance issue and below are our observations.</p>
  
  <ol>
  <li>API responds within 0.5 secs most of the time.</li>
  <li>API methods are all async methods.</li>
  <li>Sometimes it takes around 50 secs to over a minute.</li>
  <li>CPU &amp; Memory utilization are below 60%</li>
  <li>Database has 20 DTU capacity, out of which 6 DTUs are used during load testing.</li>
  <li>In the below example snapshot from Application Insights, we see total duration of the request was 27.4 secs. But the database dependency duration was just 97ms. There is no activity till the database was called. Please refer below example. </li>
  </ol>
  
  <p>Can someone please help me to understand what was happening in this 27 secs of wait time. What could be  the reason for this?</p>
  
  <p><a href="https://i.stack.imgur.com/GvYwu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GvYwu.png" alt="enter image description here"></a></p>