Quy D X Nguyen06/08/2020, 9:25 PM
will just stop querying large files (3Mb) and not close the connection. This leads to thread starvation and eventually an unresponsive app.
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.
val client = ApacheClient(responseBodyMode = BodyMode.Stream, client = HttpClients.custom() .setDefaultRequestConfig(RequestConfig.custom() .setCookieSpec(CookieSpecs.IGNORE_COOKIES) .setConnectTimeout(3000) .setSocketTimeout(3000) .build()) .setMaxConnTotal(10) .build())
dave06/09/2020, 4:10 AM
Quy D X Nguyen06/09/2020, 5:27 AM
dave06/09/2020, 6:20 AM
s4nchez06/09/2020, 8:14 AM
Quy D X Nguyen06/10/2020, 4:37 AM