Closed TJC closed 5 years ago
Are you doing GET
requests to test? akka-http by default retries idempotent requests, so maybe the timeout is working fine, but it's getting retried a couple of times, see: https://doc.akka.io/docs/akka-http/current/client-side/host-level.html#retrying-a-request
You can try setting akka.http.host-connection-pool.max-retries = 0
to disable this
Thanks Adam -- after some investigation that auto-retry turned out to be the cause.
I'm fairly sure the sttp readTimeout is not honoured by the akka http backend.
Try creating an HTTP server which accepts a request and then sleeps for five minutes.
Now use sttp to query it, with a 1 second read timeout -- And time how long it takes to go from making the request, to getting the failure message.