You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to do load-test using JMeter.
I let more than 2000 threads running concurrent while one thread means one request , and I find that many requests fail due to connecting time-out.
err := http.ListenAndServe(":8080", nil)
if err != nil {
log.Println("ListenAndServe: " + err.Error())
}else{
log.Println("start server on port 8080")
}
}`
At the same time, I get log info:
2018/01/02 08:18:01 ws.read then return EOF
Can you help me exxplain Which condition will cause the read EOF error ?
What did you expect to see?
All threads run successfully
What did you see instead?
The log info “EOF ”
The text was updated successfully, but these errors were encountered:
I don't see a bug or particular request here, and the issue tracker is only used for those. For questions about Go, see https://golang.org/wiki/Questions.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.3 linux/amd64
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build244926751=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
I want to do load-test using JMeter.
I let more than 2000 threads running concurrent while one thread means one request , and I find that many requests fail due to connecting time-out.
My code is as below:
`package main
import (
"golang.org/x/net/websocket"
"fmt"
"log"
"net/http"
)
func webHandler(ws *websocket.Conn) {
msg := make([]byte, 512)
n, err := ws.Read(msg)
if err != nil {
log.Println("ws.read ",err)
}
fmt.Printf("Receive: %s and read len: %d\n", msg[:n], n)
}
func httpEchoHandler(w http.ResponseWriter, req *http.Request){
s := websocket.Server{Handler: websocket.Handler(webHandler)}
s.ServeHTTP(w, req)
}
func main() {
http.HandleFunc("/echo",httpEchoHandler)
}`
At the same time, I get log info:
2018/01/02 08:18:01 ws.read then return EOF
Can you help me exxplain Which condition will cause the read EOF error ?
What did you expect to see?
All threads run successfully
What did you see instead?
The log info “EOF ”
The text was updated successfully, but these errors were encountered: