请执行以下步骤,解决
ECONNRESET
错误问题:1. 升级至支持
channelOptions
的最新版 Milvus NodeJS SDK。2. 手动添加
channelOptions
。
const channelOptions: ChannelOptions = {
// Send keepalive pings every 10 seconds, default is 2 hours.'grpc.keepalive_time_ms': 10 * 1000,
// Keepalive ping timeout after 5 seconds, default is 20 seconds.'grpc.keepalive_timeout_ms': 5 * 1000,
// Allow keepalive pings when there are no gRPC calls.'grpc.keepalive_permit_without_calls': 1,
};
3. 使用
channelOptions
初始化客户端。
import { MilvusClient, DataType } from '@zilliz/milvus2-sdk-node';
new MilvusClient({
address: 'your-zilliz-cloud-address',
ssl: true,
username: 'username',
password: 'your-pass',
channelOptions: channelOptions
})`