MrPowerGamerBR
01/29/2020, 2:19 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 😞http.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 AMe5l
01/29/2020, 11:19 AMMrPowerGamerBR
01/29/2020, 1:52 PMthreadsCount
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).GlobalScope
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