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

连接复用导致EOF #218

Open
ywl913 opened this issue Oct 18, 2020 · 2 comments
Open

连接复用导致EOF #218

ywl913 opened this issue Oct 18, 2020 · 2 comments

Comments

@ywl913
Copy link

ywl913 commented Oct 18, 2020

git commit: 64a11c
line: manba/pkg/util/fasthttp_client.go:266

在使用manba proxy代理gin服务时,偶现dispath node 0 with error EOF错误,经排查发现是由于默认开启长连接,而gin服务在返回时数据时,header中没有connection:closed导致连接没有及时关闭,当连接被系统close同时manba发起请求就会导致复用被关闭的连接因而引发该错误,在强制开启req.SetconnectionClose()后问题解决

@gldsly
Copy link

gldsly commented Dec 10, 2020

请问在哪里添加的 req.SetconnectionClose() ? 遇到了同样的问题..... 弄了好久没解决

@soulseen
Copy link

soulseen commented Aug 7, 2023

req.SetconnectionClose() 后不会复用连接,会造成新建TCP 的开销,感觉可以再获取连接前,检查该连接是否有效。
@zhangxu19830126 能看看这个issue吗

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

3 participants