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

httpserver_test logged error message when pressure test #457

Open
MakingL opened this issue May 12, 2020 · 2 comments
Open

httpserver_test logged error message when pressure test #457

MakingL opened this issue May 12, 2020 · 2 comments

Comments

@MakingL
Copy link

MakingL commented May 12, 2020

httpserver_test 压力测试过程中出现 ERROR 报错

我在 ARM 64bits 主机上编译了 muduo,并运行 bin 目录下的 httpserver_test,用压力测试工具 webbench (来自 https://github.com/linyacool/WebBench ),进行压力测试。在 webbench 测试结束时,httpserver_test 有 ERROR 日志输出。

为了方便测试,我注释掉了 muduo/net/http/tests/HttpServer_test.cc 第 18 行的 cout 输出语句。

image

httpserver_test 启动命令

image

webbench 启动命令

image

webbench 压测结束时 httpserver_test 的报错

image

image

Linux distro and version? x86 or ARM? 32-bit or 64-bit?

  • CentOS7.6
  • ARM 64-bit

image3

image

Branch (cpp98/cpp11/cpp17) and version of muduo?

  • cpp11 分支

image

Version of cmake, gcc and boost? (If not from distro.)

  • gcc 4.8.5
  • make 3.82
  • cmake 2.8.12.2

image

@chenshuo
Copy link
Owner

chenshuo commented May 13, 2020

我觉得这可能是你用的 webbench 的问题,这些 ERROR 消息说明 server 想发数据发不出去。
按照 HTTP 协议,应该是 server 发完 response 数据之后主动关闭连接,但是你用的 webbench 却在发完 request 之后立即自己把连接 shutdown 了。
https://github.com/linyacool/WebBench/blob/master/webbench.c#L540

你可以换别的常用测试工具再试一下,例如 ab。

@MakingL
Copy link
Author

MakingL commented May 15, 2020

好的,谢谢。我换了 ab 来压测,是正常的。

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

2 participants