We are using akka-http and below is our config , How I can timeout http client connection after 1sec ?
I tried using connecting-timeout
, but it’s not working . Any suggestions ?
FYI: I’m already passing system config to ActorSystem.
http {
client {
idle-timeout = infinite
# The time period within which the TCP connecting process must be completed.
connecting-timeout = 1s
parsing {
max-response-reason-length = 512
}
}
host-connection-pool {
idle-timeout = infinite
# The minimum duration to backoff new connection attempts after the
# previous connection attempt failed.
base-connection-backoff = 50ms
# The maximum number of times failed requests are attempted again,
# (if the request can be safely retried) before giving up and returning an error.
max-retries = 2
# Maximum backoff duration between failed connection attempts.
max-connection-backoff = 3s
}
server.default-host-header = "no-host"
# Defines the default time period within which the application has to
# produce an HttpResponse for any given HttpRequest it received.
server.request-timeout = 50s
}