Connection pool problem in Sql Server

Solution of the connection pool problem between Asp.net and Sql Server

var connection = new SqlConnection(ConnectionString);
try
{
     connection.Open();
}
finally
{
     connection.Close();                
}

or

using (SqlConnection connection = new SqlConnection(connectionString))
{
     connection.Open();
}

 

Solution of timeout problem: The following code is added in web.config.

<sytem.web>
     <httpRuntime maxRequestLength="20000" executionTimeout="999999"/>
</system.web>

 

setting connection string max pool size

<add name="conn" connectionString="Data Source=SN;Initial Catalog=DB;Integrated Security=True;Max Pool Size=50000;Pooling=True;" providerName="System.Data.SqlClient" />

 

Tagged In:

Software developer

26 Total Posts