IIS连接池错误 [英] IIS Connection Pool Errors

查看:103
本文介绍了IIS连接池错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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:

推荐答案

耗尽的最可能原因连接池是你不关闭并返回你的连接使用后进入游泳池。

确保关闭连接的最简单方法是使用使用Statement(C#Reference) [ ^ ]。

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)[^].
using (DbConnection Connection = GetConnection())
{
    //use the connection here
}


确保正确打开和关闭数据库连接



此处有一个解决方案.net - 我该如何解决ASP.NET和SQL Server之间的连接池问题? - Stack Overflow
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


这篇关于IIS连接池错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆