处理建议: 发生崩溃的 TiDB 线程的数量。当出现崩溃的时候会报警。该线程通常会被恢复,否则 TiDB 会频繁重启。请收集 panic 日志,定位原因。
[2023/11/18 08:11:51.717 +08:00] [ERROR] [client_batch.go:303] [batchSendLoop] [r={}] [stack=“github.com/tikv/client-go/v2/internal/client.(*batchConn).batchSendLoop.func1\n\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20230912041415-9c163cc8574b/internal/client/client_batch.go:305\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:884\nruntime.goPanicIndex\n\t/usr/local/go/src/runtime/panic.go:113\ngithub.com/pingcap/kvproto/pkg/tikvpb.encodeVarintTikvpb\n\t/go/pkg/mod/github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:5438\ngithub.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest).MarshalToSizedBuffer\n\t/go/pkg/mod/github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:3813\ngithub.com/pingcap/kvproto/pkg/tikvpb.(*BatchCommandsRequest).Marshal\n\t/go/pkg/mod/github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:3766\ngoogle.golang.org/protobuf/internal/impl.legacyMarshal\n\t/go/pkg/mod/google.golang.org/protobuf@v1.28.1/internal/impl/legacy_message.go:402\ngoogle.golang.org/protobuf/proto.MarshalOptions.marshal\n\t/go/pkg/mod/google.golang.org/protobuf@v1.28.1/proto/encode.go:166\ngoogle.golang.org/protobuf/proto.MarshalOptions.MarshalAppend\n\t/go/pkg/mod/google.golang.org/protobuf@v1.28.1/proto/encode.go:125\ngithub.com/golang/protobuf/proto.marshalAppend\n\t/go/pkg/mod/github.com/golang/protobuf@v1.5.2/proto/wire.go:40\ngithub.com/golang/protobuf/proto.Marshal\n\t/go/pkg/mod/github.com/golang/protobuf@v1.5.2/proto/wire.go:23\ngoogle.golang.org/grpc/encoding/proto.codec.Marshal\n\t/go/pkg/mod/google.golang.org/grpc@v1.51.0/encoding/proto/proto.go:45\ngoogle.golang.org/grpc.encode\n\t/go/pkg/mod/google.golang.org/grpc@v1.51.0/rpc_util.go:595\ngoogle.golang.org/grpc.prepareMsg\n\t/go/pkg/mod/google.golang.org/grpc@v1.51.0/stream.go:1708\ngoogle.golang.org/grpc.(*clientStream).SendMsg\n\t/go/pkg/mod/google.golang.org/grpc@v1.51.0/stream.go:846\ngithub.com/pingcap/kvproto/pkg/tikvpb.(*tikvBatchCommandsClient).Send\n\t/go/pkg/mod/github.com/pingcap/kvproto@v0.0.0-20230726063044-73d6d7f3756b/pkg/tikvpb/tikvpb.pb.go:2068\ngithub.com/tikv/client-go/v2/internal/client.(*batchCommandsClient).send\n\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20230912041415-9c163cc8574b/internal/client/client_batch.go:519\ngithub.com/tikv/client-go/v2/internal/client.(*batchConn).getClientAndSend\n\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20230912041415-9c163cc8574b/internal/client/client_batch.go:381\ngithub.com/tikv/client-go/v2/internal/client.(*batchConn).batchSendLoop\n\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20230912041415-9c163cc8574b/internal/client/client_batch.go:344”]