From 7e9702a4340b8c177b84973cfa7bad0f91f8dd79 Mon Sep 17 00:00:00 2001 From: wphan Date: Thu, 5 Dec 2024 13:06:16 -0800 Subject: [PATCH] add grpc channel keepalive options --- src/publishers/dlobPublisher.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/publishers/dlobPublisher.ts b/src/publishers/dlobPublisher.ts index dbd29ec..dc660c0 100644 --- a/src/publishers/dlobPublisher.ts +++ b/src/publishers/dlobPublisher.ts @@ -332,6 +332,11 @@ const main = async () => { grpcConfigs: { endpoint, token, + channelOptions: { + 'grpc.keepalive_time_ms': 10_000, + 'grpc.keepalive_timeout_ms': 1_000, + 'grpc.keepalive_permit_without_calls': 1, + }, }, }; @@ -437,6 +442,11 @@ const main = async () => { endpoint: endpoint, token: token, commitmentLevel: stateCommitment, + channelOptions: { + 'grpc.keepalive_time_ms': 10_000, + 'grpc.keepalive_timeout_ms': 1_000, + 'grpc.keepalive_permit_without_calls': 1, + }, }, commitment: stateCommitment, };