The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
TypeErrorNone

求助! go mysql 创建的连接数超出设置的最大值

  •  
  •   TypeErrorNone · Feb 17, 2020 · 2723 views
    This topic created in 2477 days ago, the information mentioned may be changed or developed.

    3iA8RH.png

    创建了 5000 个协程通过一个对象去操作数据库。 已经设置了最大连接数是 50,通过 show processlist,发现创建的连接数远远大于设置的,请问这是为什么?

    Supplement 1  ·  Mar 14, 2020
    求助求助,有人知道吗
    3 replies  •  2020-02-20 18:15:36 +08:00
    Mitt
    Mitt
    Feb 18, 2020
    1
    连接池了解一下
    TypeErrorNone
    TypeErrorNone
    OP
    Feb 18, 2020 via iPhone
    2
    用了链接迟,上面设置的最大链接数就是针对链接池的
    lance6716
    lance6716
    Feb 20, 2020
    3
    用了连接池 maxOpenConns 也是 50 的吧。是不是代码里没用同一个连接池
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1146 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 17:29 · PVG 01:29 · LAX 09:29 · JFK 12:29
    ♥ Do have faith in what you're doing.