Skip to content

Commit de438f1

Browse files
committed
Modify webclient config
1 parent 2bbe460 commit de438f1

File tree

1 file changed

+4
-4
lines changed
  • api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/config

1 file changed

+4
-4
lines changed

api/api-ports/api-binance-rest/src/main/kotlin/co/nilin/opex/api/ports/binance/config/WebClientConfig.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ class WebClientConfig {
2222
@Bean
2323
fun webClient(webclientBuilder: WebClient.Builder): WebClient {
2424
val cp = ConnectionProvider.builder("apiBinanceWebclientConnectionPool")
25-
.maxConnectionPools(500)
26-
.maxIdleTime(Duration.ofSeconds(10))
27-
.maxLifeTime(Duration.ofSeconds(5))
25+
.maxConnections(500)
26+
.maxIdleTime(Duration.ofSeconds(20))
27+
.maxLifeTime(Duration.ofMinutes(2))
2828
.pendingAcquireTimeout(Duration.ofSeconds(5))
2929
.evictInBackground(Duration.ofSeconds(30))
3030
.build()
3131
val client = HttpClient.create(cp)
3232
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000)
33-
.responseTimeout(Duration.ofSeconds(5))
33+
.responseTimeout(Duration.ofSeconds(10))
3434
return webclientBuilder.clientConnector(ReactorClientHttpConnector(client)).build()
3535
}
3636
}

0 commit comments

Comments
 (0)