problem: grpc upstream timeouts
solution: tune connection settings
This commit is contained in:
@@ -57,6 +57,8 @@ class GrpcUpstreams(
|
||||
val channel: ManagedChannelBuilder<*> = if (auth != null && StringUtils.isNotEmpty(auth.ca)) {
|
||||
NettyChannelBuilder.forAddress(host, port)
|
||||
.useTransportSecurity()
|
||||
.enableRetry()
|
||||
.maxRetryAttempts(3)
|
||||
.sslContext(withTls(auth))
|
||||
} else {
|
||||
log.warn("Using insecure connection to $host:$port")
|
||||
@@ -67,7 +69,7 @@ class GrpcUpstreams(
|
||||
val client = ReactorBlockchainGrpc.newReactorStub(channel.build())
|
||||
this.client = client
|
||||
var i = 0
|
||||
val grpcExecutor = Executors.newFixedThreadPool(32) { r -> Thread(r, "grpc-up-$id-${i++}") };
|
||||
val grpcExecutor = Executors.newFixedThreadPool(64) { r -> Thread(r, "grpc-up-$id-${i++}") };
|
||||
this.grpcTransport = EmeraldGrpcTransport.newBuilder()
|
||||
.forChannel(client.channel)
|
||||
.setObjectMapper(objectMapper)
|
||||
|
||||
Reference in New Issue
Block a user