MrPowerGamerBR
01/29/2020, 2:19 AMMrPowerGamerBR
01/29/2020, 2:26 AM// Maximum number of socket connections.
this.setMaxConnTotal(100_000)
// Maximum number of requests for a specific endpoint route.
this.setMaxConnPerRoute(100_000)
...but it didn't fix the issue ๐MrPowerGamerBR
01/29/2020, 2:29 AMhttp.engine.config.threadsCount
which by default is set to 4, but I'm not sure that this is the variable that should be changed.e5l
01/29/2020, 7:17 AMbitkid
01/29/2020, 8:42 AMMrPowerGamerBR
01/29/2020, 11:03 AMMrPowerGamerBR
01/29/2020, 11:08 AMe5l
01/29/2020, 11:19 AMMrPowerGamerBR
01/29/2020, 1:52 PMMrPowerGamerBR
01/29/2020, 1:57 PMMrPowerGamerBR
01/30/2020, 1:26 AMMrPowerGamerBR
01/30/2020, 1:56 AMthreadsCount
would fix the issue
val http = HttpClient(Apache) {
this.expectSuccess = false
engine {
this.socketTimeout = 25_000
this.connectTimeout = 25_000
this.connectionRequestTimeout = 25_000
customizeClient {
// Maximum number of socket connections.
this.setMaxConnTotal(100_000)
// Maximum number of requests for a specific endpoint route.
this.setMaxConnPerRoute(100_000)
}
}
}.apply {
this.engineConfig.threadsCount = 128
}
.jstack
when the issue happens to see if the threads are all stuck when this happens (or not).MrPowerGamerBR
01/30/2020, 3:10 AMMrPowerGamerBR
01/31/2020, 10:51 AMGlobalScope
without a custom dispatcher, so sometimes the default GlobalScope coroutine dispatcher was full and coroutines start being queued. (and that explains the "queueing requests"-like behavior) ๐ญ
Anyway, thanks for helping ๐e5l
01/31/2020, 10:52 AM