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

什么情况下 server 会主动 fin 客户端连接(非idle timeout) #861

Closed
coder-user opened this issue Jul 19, 2023 · 5 comments
Closed
Labels
question Further information is requested

Comments

@coder-user
Copy link

herzt server 监听的端口为 9946,使用netpoll的transport

并发性能测试时候,发现服务端请求完成后,主动 fin(非idle timeout) 的情况,在客户端连接池复用的情况下,可能会导致部分失败

请问一下,在什么情况下,服务端会主动 fin 客户端的连接???

image

当前考虑尝试设置一下 gopool.SetCap()

@github-actions github-actions bot added the invalid issue invalid issue (not related to Hertz or described in document or not enough information provided) label Jul 19, 2023
@welkeyever
Copy link
Member

应该只有短连接场景可能有存在显示的连接关闭,看看对应的请求是否带有 Connection: Close 这个 header

@welkeyever welkeyever added question Further information is requested and removed invalid issue invalid issue (not related to Hertz or described in document or not enough information provided) labels Jul 19, 2023
@rogerogers
Copy link
Contributor

HTTP版本是1.0,就带着Connection: Close貌似。

@welkeyever
Copy link
Member

嗯,HTTP/1.0 除非显示设置 Connection 为非 Close,才是长链接,默认情况都是短连接。 @coder-user

@li-jin-gou
Copy link
Member

HTTP版本是1.0,就带着Connection: Close貌似。

@rogerogers 一针见血👍🏻

@coder-user
Copy link
Author

谢谢各位 @welkeyever @rogerogers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

4 participants