.net - MySql 连接字符串中的连接生命周期=0

标签 .net sql mysql connection-string

Connection Lifetime=0 在连接字符串中到底意味着什么?

最佳答案

根据我的研究,我相信 Myra是其他答案中最接近的。

它与连接超时相同。

改为查看来自 this 的伪代码文章:

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

同一篇文章解释了为什么您很少想使用此属性(以及您可能会使用的情况)。

请注意,它已重命名为“负载平衡超时”,以试图根据上述文章阐明其行为。

关于.net - MySql 连接字符串中的连接生命周期=0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1233488/

相关文章:

c# - 如何在我的单元测试中使用模拟对象并仍然使用代码覆盖率?

c# - 派生类型的 FluentValidation SetCollectionValidator

mysql - 检查 MySql 日期时间是否为空的更好方法

c# - Linq 的 Column In (Select ...) 语句

sql - 删除前Postgres触发器检查数量

MySQL 连接查询不使用索引?

mysql - 错误 : Binlogging on server not active when setting up Master Slave replication on one machine

c# - Path.Combine 的 URLs?

c# - AOP(面向方面​​的编程)和日志记录。它真的很实用吗?

mysqldump --add-drop-procedure 或 DROP PROCEDURE IF EXISTS