go-wrk icon indicating copy to clipboard operation
go-wrk copied to clipboard

Details about the 'Errors'

Open manikantag opened this issue 10 years ago • 2 comments

Hi, I m trying to use go-wrk to benchmark my Java program. I m getting below stats:

D:\>go-wrk -c=100 -t=100  -n=100000 http://localhost:8080/test/rest/j1/text
==========================BENCHMARK==========================
URL:                            http://localhost:8080/test/rest/j1/text

Used Connections:               100
Used Threads:                   100
Total number of calls:          100000

===========================TIMINGS===========================
Total time passed:              59.95s
Avg time per request:           59.88ms
Requests per second:            1668.06
Median time per request:        59.04ms
99th percentile time:           121.08ms
Slowest time for request:       173.00ms

=============================DATA=============================
Total response body sizes:              71840
Avg response body per request:          0.72ms
Transfer rate per second:               1198.33 Byte/s (0.00 MByte/s)
==========================RESPONSES==========================
20X Responses:          14368   (14.37%)
30X Responses:          0       (0.00%)
40X Responses:          0       (0.00%)
50X Responses:          0       (0.00%)
50X Responses:          0       (0.00%)
Errors:                 85632   (85.63%)

How can I know that does these 85632 errors represent? Connection timeout? Details about this would be very useful. Thanks.

manikantag avatar May 04 '15 11:05 manikantag

I experienced the same issue. It looks like when go-wrk starts new connections it doesn't close used ports properly. Therefore you'll quickly run out of available ports in the system. You can observe it by running go-wrk and checking number of opened ports using:

netstat -ant | wc -l

When it gets near 60k you'll start to see errors.

adwinsky avatar Jun 10 '15 10:06 adwinsky

I have the same problem at Win 10 x64 golang 1.5.1. I confirmed the details of the error "Request canceled".

resp, err := tr.RoundTrip(req) // err is "net/http: request canceled"

it is resolved comment out of "resp.Body.Close()" call or change to defer. but I think that there is another problem.

// comment out or call with defer
//resp.Body.Close()
defer resp.Body.Close()

shibayan avatar Sep 24 '15 12:09 shibayan