Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
Error1:
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.

Error2:
Exception from business logic layer. 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.

Detailed Description of Error1:
at OceanManager.LocationManager.BLL.BLL_LocationManager.GetThisLocation() at _Default..ctor() at ASP.default_aspx..ctor() at __ASP.FastObjectFactory_app_web_2m4qyrtf.Create_ASP_default_aspx() at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Milestone:

Detailed Description of Error 2:
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at System.Data.SqlClient.SqlConnection.Open() at OceanManager.SQLHelper.GetSQLConnection(Databases DatabaseType) at OceanManager.SQLHelper.ExecuteReader(CommandType cmdType, String cmdText, Databases DatabaseType, SqlParameter[] cmdParams) at OceanManager.LocationManager.DAL.DAL_LocationManager.GetThisLocation() at OceanManager.LocationManager.BLL.BLL_LocationManager.GetThisLocation()
Milestone:
Posted
Comments
Jörgen Andersson 21-Jan-16 2:26am    
And what's your question?
[no name] 22-Jan-16 0:59am    
Is this coding level issue? Or IIS settings needs to change?
ZurdoDev 21-Jan-16 11:08am    
These are timeout errors. What do you want from us?
[no name] 22-Jan-16 1:08am    
I have around 10.2K hits on my server in around 11 hour ago for different modules of my product. I have IIS 7.5 working on Classic.Net pool and framework is .Net Framework 2.0.50727, OS is windows server 2008 R2. Please provide me with the suitable settings for IIS so that these kind of issues could get resolve.

The most probable reason for exhausting the connection pool is that you don't close and return your connections to the pool after use.
The easiest way to ensure you close the connection is to use a using Statement (C# Reference)[^].
C#
using (DbConnection Connection = GetConnection())
{
    //use the connection here
}
 
Share this answer
 
v2
make sure you properly open and close the db connection

there is a solution on here .net - How can I solve a connection pool problem between ASP.NET and SQL Server? - Stack Overflow
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900