Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding
<p>I am using MVC(ASP.Net + C#) based application. I have used Jquery DataTable to display records. Now issue is that for some records its working good and for some records it's giving me error like "Timeout expired" at front end side. </p>

<p>I am using Entity Framework &amp; Stored Procedure to fetch records. For some values It's giving me Timeout Error. If I directly executed this Sp with those require parameters (in which it's giving me Timeout Error) then it's working fine(but taking bit time around 11 seconds in SQL Server.). I just getting Timeout error frond end side.</p>

<p>I am getting below error.</p>

<blockquote>
  <p>{"Timeout expired.  The timeout period elapsed prior to completion of
  the operation or the server is not responding."} {"The wait operation
  timed out"}</p>
</blockquote>

<p>I have tried added in web.config</p>

<ol>
<li>Connection Lifetime=120;</li>
<li>Min Pool Size=120;</li>
<li>Connection Timeout=300;</li>
<li>Max Pool Size=1000;Pooling=true;</li>
<li><code>&lt;httpRuntime  executionTimeout="180" maxRequestLength="2000000000"  /&gt;</code></li>
</ol>

<p>But didn't workout.</p>

<p><strong><em>My Web.Config as below.</em></strong></p>

<pre><code>&lt;add name="TestEntities" connectionString="metadata=res://*/Test2.csdl|res://*/Test2.ssdl|res://*/Test2.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=.;initial catalog=Test2;integrated security=True;multipleactiveresultsets=True;Connection Lifetime=120;Min Pool Size=120;Connection Timeout=300;Max Pool Size=1000;Pooling=true;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
</code></pre>

<p>
    
</p>

<p>Please help.</p>

<p>Thanks
-Nimesh</p>