ASP.NET - Timeout expired. - Asked By amala mandarapu on 26-Jun-12 06:45 AM

Jitendra Faye replied to amala mandarapu on 26-Jun-12 06:48 AM
For this increase TimeOut in web.config file like this-

<httpRuntime executionTimeout="value"/>

Vikram Singh Saini replied to amala mandarapu on 26-Jun-12 06:50 AM
Timeout expired error occurs when there is long running query or when there is lot of load on server. So for the moment server is unable to process your request.

You can go with the link for more details.
amala mandarapu replied to Jitendra Faye on 26-Jun-12 06:56 AM
i am facing this error.
"Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached."

i my project i am using sqlhelper.cs file for the database to execute. and one doubt is where can i find sql connection timeout in database.when i was debugging the code it is showing connectiontimeout as 15.i am getting the solution for this.please help me in solving the problem.

Lalit M replied to amala mandarapu on 26-Jun-12 06:59 AM
How to avoid Timeout expired check this link:
dipa ahuja replied to amala mandarapu on 26-Jun-12 08:02 AM
Increase the timeOut attribute of your connection
 <add name="ConnectionString" connectionString="Data Source=;Initial Catalog=;Persist Security Info=True;User ID=sa;Password=sa@123;Connect Timeout=200" providerName="System.Data.SqlClient"/>
 SqlConnection conn = new SqlConnection("ConnString");
 SqlCommand comm = new SqlCommand();
 comm.CommandTimeout = 120;
amala mandarapu replied to dipa ahuja on 26-Jun-12 08:07 AM
i used all these eventhough facing the same problem.
KCH replied to amala mandarapu on 27-Jun-12 01:06 AM

Try to set TimeOut  for ConnectionString,  for example:

<add key="DBConnection" value="server=LocalHost;uid=sa;pwd=;database=DataBaseName;Connect Timeout=200; pooling='true'; Max Pool Size=200"/>

Or add the statement: sqlSelectCommand1.CommandTimeout = 200;

You can try to set a larger value