Description
Using this library with v0.9 running on AWS managed Apache Flink. We see about 50% of our requests end with the below java.net.http.HttpConnectTimeoutException: HTTP connect timed out
. The curious thing is that we aren't actually seeing those requests make it to the service with the endpoint, it appears the timeout is occurring within Flink and the requests aren't actually being sent out.
Is it possible that an external factor is causing the timed out error to occur in this library apart from the actual http request to the endpoint timing out. We also see an error messaging logging that e.g: Http Sink failed to write and will retry 16 requests
, but from reading the documentation and the code it seems that the library doesn't actually retry timeout requests?
Request fatally failed because of an exception
java.util.concurrent.CompletionException: java.net.http.HttpConnectTimeoutException: HTTP connect timed out
at java.base/java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:367)
at java.base/java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:376)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1074)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
at java.net.http/jdk.internal.net.http.Http1Exchange.lambda$cancelImpl$9(Http1Exchange.java:482)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.net.http.HttpConnectTimeoutException: HTTP connect timed out
at java.net.http/jdk.internal.net.http.ResponseTimerEvent.handle(ResponseTimerEvent.java:68)
at java.net.http/jdk.internal.net.http.HttpClientImpl.purgeTimeoutsAndReturnNextDeadline(HttpClientImpl.java:1248)
at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:877)
Caused by: java.net.ConnectException: HTTP connect timed out
at java.net.http/jdk.internal.net.http.ResponseTimerEvent.handle(ResponseTimerEvent.java:69)
... 2 more