Couldn't it be Keep-Alive connections?
What if you add "Connection: close" header to every server response?
Or call SetKeepAlivesEnabled on 
server https://golang.org/pkg/net/http/#Server.SetKeepAlivesEnabled

пятница, 29 июля 2016 г., 17:22:51 UTC+3 пользователь Manideep Attanti 
написал:
>
> The pprof stats show around 900 go-routines and most of them are waiting 
> on read request. This is causing server response time to shoot up. Any 
> insights on how to debug this.
>
> goroutine 1842715 [IO wait, 1 minutes]:
> net.runtime_pollWait(0x7f753ba71ef0, 0x72, 0xc8270e9000)
>       /root/.gvm/gos/go1.6.2/src/runtime/netpoll.go:160 +0x60
> net.(*pollDesc).Wait(0xc841f5a7d0, 0x72, 0x0, 0x0)
>       /root/.gvm/gos/go1.6.2/src/net/fd_poll_runtime.go:73 +0x3a
> net.(*pollDesc).WaitRead(0xc841f5a7d0, 0x0, 0x0)
>       /root/.gvm/gos/go1.6.2/src/net/fd_poll_runtime.go:78 +0x36
> net.(*netFD).Read(0xc841f5a770, 0xc8270e9000, 0x1000, 0x1000, 0x0, 
> 0x7f753da8a050, 0xc82000a1c0)
>       /root/.gvm/gos/go1.6.2/src/net/fd_unix.go:250 +0x23a
> net.(*conn).Read(0xc826364ec8, 0xc8270e9000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
>       /root/.gvm/gos/go1.6.2/src/net/net.go:172 +0xe4
> net/http.(*connReader).Read(0xc82420db40, 0xc8270e9000, 0x1000, 0x1000, 0x0, 
> 0x0, 0x0)
>       /root/.gvm/gos/go1.6.2/src/net/http/server.go:526 +0x196
> bufio.(*Reader).fill(0xc84b94a8a0)
>       /root/.gvm/gos/go1.6.2/src/bufio/bufio.go:97 +0x1e9
> bufio.(*Reader).Peek(0xc84b94a8a0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0)
>       /root/.gvm/gos/go1.6.2/src/bufio/bufio.go:132 +0xcc
> net/http.(*conn).readRequest(0xc842ca8b80, 0x0, 0x0, 0x0)
>       /root/.gvm/gos/go1.6.2/src/net/http/server.go:702 +0x2e6
> net/http.(*conn).serve(0xc842ca8b80)
>       /root/.gvm/gos/go1.6.2/src/net/http/server.go:1425 +0x947
> created by net/http.(*Server).Serve
>       /root/.gvm/gos/go1.6.2/src/net/http/server.go:2137 +0x44e
>
>
> All other goroutines are waiting on same read request.
>
>
> Thanks.
>
> Manideep
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to