milvus-io / milvus-sdk-go

Go SDK for Milvus.
Apache License 2.0
353 stars 110 forks source link

[Bug]: rpc error: code = Canceled desc = grpc: the client connection is closing #314

Open cjh6666688888 opened 2 years ago

cjh6666688888 commented 2 years ago

Is there an existing issue for this?

Current Behavior

An exception occurred during the query through the Search interface. Procedure。 rpc error: code = Canceled desc = grpc: the client connection is closing

Expected Behavior

No response

Steps To Reproduce

1.Use the Search interface
2. Query exception,rpc error: code = Canceled desc = grpc: the client connection is closing

Environment

milvus-sdk-go/v2 v2.1.2-0.20220823032848-8832edc6f96e

Anything else?

No response

congqixia commented 2 years ago

@cjh6666688888 thanks for the issue. Could you please provided the code snippet for creating client and searching? It's hard to determine what caused your problem only with the error code. Just in short, this may caused by connect closed during the procedure of searching

lypee commented 10 months ago

i have the same question . when i use mClient, err := client.NewGrpcClient(ctx, addr) if err != nil { return nil, err } hasConn, err := mClient.HasCollection(ctx, collectionName) logger.InfofX(ctx, fmt.Sprintf("HasCollection.[%+v] ,err:[%+v]", hasConn, err))

HasCollection.[false] ,err:[rpc error: code = DeadlineExceeded desc = context deadline exceeded

Environment milvus-sdk-go/v2 v2.2.1