Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http连接池设置不合理导致的问题 #65

Open
wulj04 opened this issue Apr 28, 2022 · 0 comments
Open

http连接池设置不合理导致的问题 #65

wulj04 opened this issue Apr 28, 2022 · 0 comments

Comments

@wulj04
Copy link

wulj04 commented Apr 28, 2022

go version: 1.13

alibabacloud-go/tea

问题描述:发现sdk在较多的请求时不停的创建、关闭http连接,造成大量的dns解析和一些其它性能消耗

问题原因:经过排查,发现sdk提供了MaxIdleConns参数,但在创建http池的时候并未采用该参数,最终采用了默认的DefaultMaxIdleConnsPerHost=2,则最终的结果是,一旦空闲连接数超过2,其它结束请求的连接就会被关闭,造成的现象就是sdk在不停创建、关闭连接,http的连接复用机制形同虚设。

建议:规范sdk的参数的采用,或者给出合理的默认值

烦请有看到此issue麻烦尽快给个回复,因为对于我们这边算是线上问题了,如果官方没法很快给出修复版本,我们可能要自己fork代码去修改此问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant