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.
I am using Entity Framework & 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.
I am getting below error.
{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."} {"The wait operation timed out"}
I have tried added in web.config
- Connection Lifetime=120;
- Min Pool Size=120;
- Connection Timeout=300;
- Max Pool Size=1000;Pooling=true;
<httpRuntime executionTimeout="180" maxRequestLength="2000000000" />
But didn't workout.
My Web.Config as below.
<add name="TestEntities" connectionString="metadata=res://*/Test2.csdl|res://*/Test2.ssdl|res://*/Test2.msl;provider=System.Data.SqlClient;provider connection string="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"" providerName="System.Data.EntityClient" />
Please help.
Thanks -Nimesh
command timeout
where you call the stored procedure on the data context. The http runtime is for when the request times out against the IIS, and connection timeout is for creating connection. (also - based on your mention, it might be the stored procedure also suffers from parameter sniffing issues and/or should be optimized) – Allan S. Hansen Apr 7 '16 at 9:02