ydb-go-sdk icon indicating copy to clipboard operation
ydb-go-sdk copied to clipboard

bug: received prior goaway: code: ENHANCE_YOUR_CALM

Open neyguvj opened this issue 8 months ago • 0 comments

Bug Report

YDB GO SDK version:

3.74.0

Environment

Ubuntu 22.04 x64

Current behavior: Error while executing query

 non-retryable error occurred on attempt No.1 (idempotent=false): connError{node_id:0,address:'localhost:12136'}: transport/Unavailable (code = 14, source error = "rpc error: code = Unavailable desc = closing transport due to: connection error: desc = \"error reading from server: EOF\", received prior goaway: code: ENHANCE_YOUR_CALM, debug data: \"too_many_pings\"", address: "localhost:12136") at `github.com/ydb-platform/ydb-go-sdk/v3/internal/conn.(*grpcClientStream).RecvMsg(grpc_client_stream.go:169)` at `github.com/ydb-platform/ydb-go-sdk/v3/internal/query.nextPart(result.go:143)`

Expected behavior:

QueryService works correctly.

Steps to reproduce: Run any query using queryService.

Related code:

func (s *ydbTestSuite) TestQueryReadRow() {
	ctx, cancel := s.context()
	defer cancel()

	expectedValue := 1
	var actualValue int

	err := s.Query().Do(ctx, func(ctx context.Context, session query.Session) error {
		row, err := session.ReadRow(ctx, "SELECT 1 AS value", query.WithStatsMode(query.StatsModeBasic))
		if err != nil {
			return err
		}
		if err = row.Scan(&actualValue); err != nil && !errors.Is(err, io.EOF) {
			return err
		}

		return nil
	})
	s.Require().NoError(err)
	s.Require().Equal(expectedValue, actualValue)
}

Other information: gRPC server log

2024-06-11T15:53:56.010+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10] Channel switches to new LB policy "round_robin"
2024-06-11T15:53:56.010+0300    DEBUG   grpclog/component.go:55 [balancer]base.baseBalancer: got new ClientConn state: {{[{Addr: "127.0.0.1:2136", ServerName: "", } {Addr: "[::1]:2136", ServerName: "", }] <nil> <nil>} <nil>}
2024-06-11T15:53:56.010+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10 SubChannel #11] Subchannel created
2024-06-11T15:53:56.010+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10 SubChannel #12] Subchannel created
2024-06-11T15:53:56.010+0300    DEBUG   grpclog/component.go:71 [roundrobin]roundrobinPicker: Build called with info: {map[]}
2024-06-11T15:53:56.010+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10] Channel Connectivity change to CONNECTING
2024-06-11T15:53:56.010+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10 SubChannel #11] Subchannel Connectivity change to CONNECTING
2024-06-11T15:53:56.010+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10 SubChannel #12] Subchannel Connectivity change to CONNECTING
2024-06-11T15:53:56.010+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10 SubChannel #11] Subchannel picks a new address "127.0.0.1:2136" to connect
2024-06-11T15:53:56.010+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10 SubChannel #12] Subchannel picks a new address "[::1]:2136" to connect
2024-06-11T15:53:56.011+0300    DEBUG   grpclog/component.go:71 [balancer]base.baseBalancer: handle SubConn state change: 0xc000c34888, CONNECTING
2024-06-11T15:53:56.011+0300    DEBUG   grpclog/component.go:71 [balancer]base.baseBalancer: handle SubConn state change: 0xc000c348a0, CONNECTING
2024-06-11T15:53:56.011+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10 SubChannel #11] Subchannel Connectivity change to READY
2024-06-11T15:53:56.011+0300    DEBUG   grpclog/component.go:71 [balancer]base.baseBalancer: handle SubConn state change: 0xc000c34888, READY
2024-06-11T15:53:56.011+0300    DEBUG   grpclog/component.go:71 [roundrobin]roundrobinPicker: Build called with info: {map[SubConn(id:11):{{Addr: "127.0.0.1:2136", ServerName: "", }}]}
2024-06-11T15:53:56.011+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10] Channel Connectivity change to READY
2024-06-11T15:53:56.011+0300    DEBUG   channelz/funcs.go:340   [core][Channel #10 SubChannel #12] Subchannel Connectivity change to READY
2024-06-11T15:53:56.011+0300    DEBUG   grpclog/component.go:71 [balancer]base.baseBalancer: handle SubConn state change: 0xc000c348a0, READY
2024-06-11T15:53:56.011+0300    DEBUG   grpclog/component.go:71 [roundrobin]roundrobinPicker: Build called with info: {map[SubConn(id:11):{{Addr: "127.0.0.1:2136", ServerName: "", }} SubConn(id:12):{{Addr: "[::1]:2136", ServerName: "", }}]}

neyguvj avatar Jun 11 '24 13:06 neyguvj