What exactly does Connection Lifetime=0
mean in a connection string?
Based on my research I believe that Myra is the closest of the other answers.
It is not the same as the connection timeout.
Instead see this pseudocode from this article:
On SqlConnection.Close
Check if time the connection has been open is greater than Connection Lifetime if it is, throw the connection away
Else Put connection on the pool
The same article explains why you would rarely want to use this property (and the situations in which you might).
Note that it has been renamed to "Load Balance Timeout" in an attempt to clarify its behavior per the above article.
In addition, When you use Connection LifeTime: It destroys pooled connections If the time your connection is opened for is larger than Connection LifeTime,connection is not usable.
I suggest that using Connection LifeTime if you have not a connection within a cluster of server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With