gpt4 book ai didi

postgresql - getsockopt : connection timed out

转载 作者:数据小太阳 更新时间:2023-10-29 03:25:02 29 4
gpt4 key购买 nike

我将我的项目从 python tornado 重写为 go(使用 iris 框架)。基本功能测试正常。我在高并发下测试的时候,app总是停一会,然后报错:

(dial tcp 192.168.1.229:6543: getsockopt: connection timed out)

6543 端口是与 pgbouncer 一起使用的 postgresql 端口...pgbouncer 和 postgresl 进程运行正常。

另外,我发现memcache连接有时会超时(memcache进程还在工作)。

这是否因为连接太多而发生?或者有些连接不是准时关门?我怎样才能避免这个问题?

最佳答案

检查您的 PgBouncer config .尝试增加 max_client_conn 选项。然后在压力测试期间尝试并发级别和请求计数。另一个可能的问题是您没有将连接返回到池中。

关于postgresql - getsockopt : connection timed out,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44364233/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com