linkxzhou/http_bench

关于-c参数执行报错的问题

zjskobe opened this issue · 1 comments

以下是必现的问题
./http_bench -c 1000 -d 20s -url https://www.test.com
-c参数好像超过500就一定会报错,500就正常,我的机器CPU是8核
[ERROR] err: Get "https://www.test.com/kkk": dial tcp 192.168.1.3:443: i/o timeout (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https:/www.test.com/kkk": dial tcp 192.168.1.3:443: i/o timeout (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": dial tcp 192.168.1.3:443: i/o timeout (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": dial tcp 192.168.1.3:443: i/o timeout (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": dial tcp 192.168.1.3:443: i/o timeout (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": dial tcp 192.168.1.3:443: i/o timeout (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": dial tcp 192.168.1.3:443: i/o timeout (Client.Timeout exceeded while awaiting headers)
[ERROR] err: Get "https://www.test.com/kkk": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

这个是对端超时,你可以加一个-t 超时参数(比如10000ms,默认是3000ms),如:

./http_bench -c 1000 -t 10000 -d 20s -url https://www.test.com/