Azure SQL frequent connection timeouts
<p>We're running a web app (2 instances) on Azure, backed by a SQL Azure database. At any given time there are 50-150 users using the website. The database runs at S2 performance level. The DTU is around 20% on average.</p>
<p>However, a few times every day I suddenly get hundreds of errors in my logs with timeouts, like this:</p>
<blockquote>
<p>An error occurred while executing the command definition. See the inner exception for details.</p>
<p>The wait operation timed out.</p>
<p>Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original server was - [Pre-Login] initialization=1; handshake=21; [Login] initialization=0; authentication=0; [Post-Login] complete=1;</p>
</blockquote>
<p>We're using EF6 for queries with the default command timeout. I've configured this execution strategy:</p>
<pre><code>SetExecutionStrategy(&quot;System.Data.SqlClient&quot;, 
            () =&gt; new SqlAzureExecutionStrategy(10, TimeSpan.FromSeconds(15)));
</code></pre>
<p>The database (about 15GB total) is heavily indexed. These errors occur all over the place, usually dozens to hundreds within 1-2 minutes.</p>
<p>What steps can I take to prevent this from happening?</p>