我正在测试eventlet,我收到此错误:
~>ab -n 10 -c 1 http://localhost:8090/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)...apr_socket_recv: Connection reset by peer (54)
Total of 2 requests completed
Run Code Online (Sandbox Code Playgroud)
该网站在localhost:8090 /工作,并返回200 OK.
我和tomcat有同样的问题,网站再次运行良好.
问题可能是什么?
我正在从Windows 7/SP1客户端加载测试IIS 7.5(WinR2/SP1).我有一个脚本,可以进行三次ab调用:
start /B cmd /c ab.exe -k -n 500 -c 50 http://rhvwr2vsu410/HelloWebAPI/Home/SyncProducts > SyncProducts.txt
Run Code Online (Sandbox Code Playgroud)
当并发度大于5时,我很快就会收到错误消息
apr_poll:指定的超时已过期(70007)
并ab停止提出请求.我甚至没有完成100个请求.
这是在启动脚本后的30秒内发生的.在AB文档页面没有提供太多.相关的Stack Overflow问题.服务器故障相关问题.
每当我使用'ab'对Web服务器进行基准测试时,它会在发送大量请求后冻结一段时间,但仅在20秒左右后继续.
考虑以下用Ruby编写的HTTP服务器模拟器:
require 'socket'
RESPONSE = "HTTP/1.1 200 OK\r\n" +
"Connection: close\r\n" +
"\r\n" +
"\r\n"
buffer = ""
server = TCPServer.new("127.0.0.1", 3000) # Create TCP server at port 3000.
server.listen(1024) # Set backlog to 1024.
while true
client = server.accept # Accept new client.
client.write(RESPONSE) # Write a stock "HTTP" response.
client.close_write # Shutdown write part of the socket.
client.read(nil, buffer) # Read all data from the socket.
client.close # Close it.
end
Run Code Online (Sandbox Code Playgroud)
然后我按如下方式运行ab:
ab -n 45000 -c 10 …Run Code Online (Sandbox Code Playgroud)