【问题标题】:What is the default connection timeout for a PySQLPool connection?PySQLPool 连接的默认连接超时是多少?
【发布时间】:2015-04-05 15:45:30
【问题描述】:

我无法找到该信息。在PySQLPool的文档中,我们有以下类来创建一个新的连接对象:

 class PySQLPool.PySQLConnection([host[, user[, passwd[, db[, port]]]]], **kargs)

其中一个 kwargs 是:

connect_timeout - 连接前等待的秒数 尝试失败。

connect_timeout 的默认值是多少?是不是和MySQL默认的10秒一样?

【问题讨论】:

    标签: python mysql sql


    【解决方案1】:

    查看source 它显示:

     connection_timeout = datetime.timedelta(seconds=20)
    

    【讨论】:

      猜你喜欢
      • 2018-05-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-03
      • 1970-01-01
      • 2016-10-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多