Connection Lifetime = 0 in MySql connection string

What does Connection Lifetime=0the connection string mean ?

+5
source share
4 answers

Updated: A value of 0 (0) causes the merged connections to have a maximum connection timeout.

Ref .

+1
source

Based on my research, I believe Myra is the closest of the other answers.

This is not the same as connection timeout.

Instead, check out this pseudo-code for 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

, ( , ).

, "Time Balance Time Timeout", .

+4

, Connection LifeTime: , Connection LifeTime, .

Connection LifeTime,

+2

, . , 300, , , , -. 0, .

-1

All Articles