开发者

Connection pooling in .Net Sql Provider - when connection is closed

开发者 https://www.devze.com 2022-12-14 08:04 出处:网络
I just wonder after what duration .Net Sql Provider will close connection which is in pool? 开发者_JAVA百科Thanks, PawelThe documentation does not specify how long connections in the connection pool

I just wonder after what duration .Net Sql Provider will close connection which is in pool?

开发者_JAVA百科Thanks, Pawel


The documentation does not specify how long connections in the connection pool stay open. The optimizer decides, and its algorithm might change between versions of ADO.NET (or maybe even Windows Update patches.)

You can control the maximum lifetime through a connection string setting:

Connection Lifetime=0

By default, it's 0, which means a connection can live as long as the optimizer thinks it's useful.

0

精彩评论

暂无评论...
验证码 换一张
取 消