SQL Server连接池(ADO.NET)的不活动时间 [英] SQL Server Connection Pooling (ADO.NET) Inactivity period

查看:174
本文介绍了SQL Server连接池(ADO.NET)的不活动时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是不活动"?与SQL Server连接池(ADO.NET)相关的方法
是根据时间决定的吗?如果是,那么如何获得限制?

What does "inactivity" means related to SQL Server Connection Pooling (ADO.NET)
Is it decided based on time ?If yes, then how to get the limit?
and what happenes when the inactivity limit reached?

推荐答案

不活动是基于时间的.经过一定时间后,如果不重新使用池中的连接,则将其关闭.但是,池中保留了许多连接.此连接数量由MinPoolSize控制.

据我所知,没有确切的时间可以使连接在被销毁之前保持不活动状态.根据我的了解,工作量,免费连接的数量等都会影响这一点.

即使没有直接定义闲置时间,对闲置时间也会影响寿命的唯一参数是Connection LifetimeLoad Balance Timeout.
The inactivity is based on time. After certain amount of time a pooled connection is closed if it isn''t reused. However a number of connections are kept in the pool. This amount of connections is controlled by MinPoolSize.

As far as I know there''s no accurate time which the connection can stay inactive before it''s destroyed. As per my understanding the workload, amount of free connections etc affect this.

The only parameters which has an effect to the lifetime regarding inactivity period are Connection Lifetime and Load Balance Timeout even though they directly don''t define the inactivity period.


这篇关于SQL Server连接池(ADO.NET)的不活动时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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