We are using akka http client for downloading files. And these connection & idle timeout props are set in config files:
CONFIG_FORCE_app_file__dl_http_akka_http_host__connection__pool_client_connecting__timeout: 2s
CONFIG_FORCE_app_file__dl_http_akka_http_host__connection__pool_client_idle__timeout: 3s
These timeouts work in most of calls, but we have some instances in our logs which take a lot more time than the configured timeouts:
StreamTcpException (connect timeout):
Download failed in "51942"ms with reason "StreamTcpException".
error-msg:
[Tcp command [Connect(file.example.com/<unresolved>:443,None,List(),Some(2 seconds),true)] failed
because of akka.io.TcpOutgoingConnection$$anon$2: Connect timeout of Some(2 seconds) expired].
TcpIdleTimeoutException (idle timeout):
Download failed in in "39424"ms with reason "TcpIdleTimeoutException".
error-msg:
[TCP idle-timeout encountered on connection to [file.example.com/<unresolved>:80],
no bytes passed in the last 3 seconds].
Is there anything we can check/do to fix the issue?
We are using akka-http:10.2.0 & akka:2.6.19.