You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/08/20 10:31:38 UTC
[GitHub] [dubbo-go] wangxw666 opened a new issue #1406: grpc goroutine optimize
wangxw666 opened a new issue #1406:
URL: https://github.com/apache/dubbo-go/issues/1406
环境:
- 注册中心: zk
- 协议:grpc
- dubbo-go 版本:1.5.7-rc2
问题:
消费者一个服务,提供者每增加一个实例都会创建6个协程。
查看pprof:
```
goroutine profile: total 44
5 @ 0x43bba0 0x407a25 0x4076db 0x8dddfa 0x46be31
# 0x8dddf9 google.golang.org/grpc.(*addrConn).resetTransport+0x6e9 /home/gopath/pkg/mod/google.golang.org/grpc@v1.38.0/clientconn.go:1214
5 @ 0x43bba0 0x43481a 0x433d85 0x4d91f5 0x4da08b 0x4da06d 0x65656f 0x66927e 0x5a4ccf 0x4d67c7 0x83d047 0x83cffa 0x83d881 0x8645a9 0x46be31
# 0x433d84 internal/poll.runtime_pollWait+0x54 /home/go/src/runtime/netpoll.go:203
# 0x4d91f4 internal/poll.(*pollDesc).wait+0x44 /home/go/src/internal/poll/fd_poll_runtime.go:87
# 0x4da08a internal/poll.(*pollDesc).waitRead+0x19a /home/go/src/internal/poll/fd_poll_runtime.go:92
# 0x4da06c internal/poll.(*FD).Read+0x17c /home/go/src/internal/poll/fd_unix.go:169
# 0x65656e net.(*netFD).Read+0x4e /home/go/src/net/fd_unix.go:202
# 0x66927d net.(*conn).Read+0x8d /home/go/src/net/net.go:184
# 0x5a4cce bufio.(*Reader).Read+0x24e /home/go/src/bufio/bufio.go:226
# 0x4d67c6 io.ReadAtLeast+0x86 /home/go/src/io/io.go:310
# 0x83d046 io.ReadFull+0x86 /home/go/src/io/io.go:329
# 0x83cff9 golang.org/x/net/http2.readFrameHeader+0x39 /home/gopath/pkg/mod/golang.org/x/net@v0.0.0-20201202161906-c7110b5ffcbb/http2/frame.go:237
# 0x83d880 golang.org/x/net/http2.(*Framer).ReadFrame+0xa0 /home/gopath/pkg/mod/golang.org/x/net@v0.0.0-20201202161906-c7110b5ffcbb/http2/frame.go:492
# 0x8645a8 google.golang.org/grpc/internal/transport.(*http2Client).reader+0x178 /home/gopath/pkg/mod/google.golang.org/grpc@v1.38.0/internal/transport/http2_client.go:1347
5 @ 0x43bba0 0x44bf91 0x853052 0x85395d 0x87757b 0x46be31
# 0x853051 google.golang.org/grpc/internal/transport.(*controlBuffer).get+0x121 /home/gopath/pkg/mod/google.golang.org/grpc@v1.38.0/internal/transport/controlbuf.go:407
# 0x85395c google.golang.org/grpc/internal/transport.(*loopyWriter).run+0x1cc /home/gopath/pkg/mod/google.golang.org/grpc@v1.38.0/internal/transport/controlbuf.go:527
# 0x87757a google.golang.org/grpc/internal/transport.newHTTP2Client.func3+0x7a /home/gopath/pkg/mod/google.golang.org/grpc@v1.38.0/internal/transport/http2_client.go:396
5 @ 0x43bba0 0x44bf91 0x8d5792 0x46be31
# 0x8d5791 google.golang.org/grpc.(*ccBalancerWrapper).watcher+0xc1 /home/gopath/pkg/mod/google.golang.org/grpc@v1.38.0/balancer_conn_wrappers.go:69
5 @ 0x43bba0 0x44bf91 0xc853b6 0xc896c8 0x46be31
# 0xc853b5 github.com/apache/dubbo-go/remoting/zookeeper.(*ZkEventListener).listenServiceNodeEvent+0x195 /home/gopath/pkg/mod/github.com/apache/dubbo-go@v1.5.7-rc2-0.20210809082309-ace2a0e6c0f9/remoting/zookeeper/listener.go:94
# 0xc896c7 github.com/apache/dubbo-go/remoting/zookeeper.(*ZkEventListener).listenDirEvent.func1+0x97 /home/gopath/pkg/mod/github.com/apache/dubbo-go@v1.5.7-rc2-0.20210809082309-ace2a0e6c0f9/remoting/zookeeper/listener.go:309
3 @ 0x43bba0 0x44bf91 0xc853b6 0xc8942a 0x46be31
# 0xc853b5 github.com/apache/dubbo-go/remoting/zookeeper.(*ZkEventListener).listenServiceNodeEvent+0x195 /home/gopath/pkg/mod/github.com/apache/dubbo-go@v1.5.7-rc2-0.20210809082309-ace2a0e6c0f9/remoting/zookeeper/listener.go:94
# 0xc89429 github.com/apache/dubbo-go/remoting/zookeeper.(*ZkEventListener).handleZkNodeEvent.func2+0x89 /home/gopath/pkg/mod/github.com/apache/dubbo-go@v1.5.7-rc2-0.20210809082309-ace2a0e6c0f9/remoting/zookeeper/listener.go:181
```
provider每增加一个实例,消费者都会创建上面的每一个协程,共6个
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] wangxw666 closed issue #1406: grpc goroutine optimize
Posted by GitBox <gi...@apache.org>.
wangxw666 closed issue #1406:
URL: https://github.com/apache/dubbo-go/issues/1406
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org