osx - Connect reset by peer with Golang http server on Mac OS10.9.5 -
i got weird error when writing stress tests on golang web application. here code web server
package httptest import ( "net/http" "testing" ) func testhttptest(t *testing.t) { http.handlefunc("/", func(res http.responsewriter, req *http.request) { //<-time.after(2 * time.second) }) http.listenandserve(":2222", nil) }
when run go test ./... , utilize apachebench perform stress test:
ab -c 200 -n 1000 http://localhost:2222/123
it gives me next error randomly:
copyright 1996 adam twiss, zeus technology ltd, http://www.zeustech.net/ licensed apache software foundation, http://www.apache.org/ benchmarking localhost (be patient) completed 100 requests completed 200 requests apr_socket_recv: connection reset peer (54) total of 235 requests completed
i running test on mac os 10.9. ulimit of os setting unlimited. meet same problem?
osx go
No comments:
Post a Comment