Quy D X Nguyen
06/08/2020, 9:25 PMApacheClient
will just stop querying large files (3Mb) and not close the connection. This leads to thread starvation and eventually an unresponsive app.
val client = ApacheClient(responseBodyMode = BodyMode.Stream, client = HttpClients.custom()
.setDefaultRequestConfig(RequestConfig.custom()
.setCookieSpec(CookieSpecs.IGNORE_COOKIES)
.setConnectTimeout(3000)
.setSocketTimeout(3000)
.build())
.setMaxConnTotal(10)
.build())
I'm just piping the resulting stream directly into a response, and when I augmented the ReadCalls with some printlns, they just suddenly stop after a while - and then my app freezes.
Edit: It can also happen on smaller files. What's important is that the connection doesn't appear to be closed.dave
06/09/2020, 4:10 AMQuy D X Nguyen
06/09/2020, 5:27 AMdave
06/09/2020, 6:20 AMs4nchez
06/09/2020, 8:14 AMQuy D X Nguyen
06/10/2020, 4:37 AM