Skip to content

Commit f5f66c9

Browse files
authored
fix: make keepalive params a bit conservative (googleapis#528)
1 parent e7d636a commit f5f66c9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,9 @@ public ManagedChannelBuilder apply(ManagedChannelBuilder input) {
124124
return input.usePlaintext();
125125
}
126126
})
127-
.setKeepAliveTime(Duration.ofSeconds(10)) // sends ping in this interval
127+
.setKeepAliveTime(Duration.ofSeconds(30)) // sends ping in this interval
128128
.setKeepAliveTimeout(
129129
Duration.ofSeconds(10)) // wait this long before considering the connection dead
130-
.setKeepAliveWithoutCalls(true) // sends ping without active streams
131130
.build());
132131

133132
LOGGER.info("Connecting to the Bigtable emulator at " + hostname + ":" + port);

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,9 @@ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProvi
245245
return BigtableStubSettings.defaultGrpcTransportProviderBuilder()
246246
.setPoolSize(getDefaultChannelPoolSize())
247247
.setMaxInboundMessageSize(MAX_MESSAGE_SIZE)
248-
.setKeepAliveTime(Duration.ofSeconds(10)) // sends ping in this interval
248+
.setKeepAliveTime(Duration.ofSeconds(30)) // sends ping in this interval
249249
.setKeepAliveTimeout(
250250
Duration.ofSeconds(10)) // wait this long before considering the connection dead
251-
.setKeepAliveWithoutCalls(true) // sends ping without active streams
252251
// TODO(weiranf): Set this to true by default once DirectPath goes to public beta
253252
.setAttemptDirectPath(isDirectPathEnabled());
254253
}

0 commit comments

Comments
 (0)