通过对等/断开的管道连接由太多Postgres conncetions重置

时间:2018-05-23 09:14:00

标签: postgresql go networking connection-pooling psql

使用sqlx和几个并发连接,我很快就遇到了Too many open connections的问题。限制db.DB.MaxOpenConnections实际上摆脱了问题并激活了我希望的连接池。

现在我们在一些机器上进行了测试,测试中确切地说太多的开放连接没有发生不同的错误:

read tcp [::1]:54883->[::1]:5432: read: connection reset by peer
read tcp [::1]:54886->[::1]:5432: read: connection reset by peer
read tcp [::1]:54884->[::1]:5432: read: connection reset by peer
read tcp [::1]:54887->[::1]:5432: read: connection reset by peer
read tcp [::1]:54885->[::1]:5432: read: connection reset by peer
read tcp [::1]:54888->[::1]:5432: read: connection reset by peer
…

Postgres日志不会透露任何内容。这可能发生在网络堆栈上吗?我还能做些什么来调试这个?我无法在本地重现它。

0 个答案:

没有答案