akka/akka-http

Akka http 10.0.10 not applying custom timeout for client requests

开放

#1,527 创建于 2017年11月12日

 (6 条评论) (0 个反应) (0 位负责人)Scala (598 个派生)batch import
1 - triagedhelp wantedsmallt:clientt:coret:docs

仓库指标

星标
 (1,311 个星标)
PR 合并指标
 (平均合并 1天 10小时) (30 天内合并 2 个 PR)

描述

Hi,

Is possible that the timeout configuration is not being used in Akka 10.0.10?

  val akkaVersion = "2.5.6"
  val akkaHttpVersion = "10.0.10"
  //Akka
  "com.typesafe.akka" %% "akka-actor" % akkaVersion,
  "com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test,

  //AkkaHttp
  "com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
  "com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,

  //To be compatible between Akka and Akka http
  "com.typesafe.akka" %% "akka-stream" % akkaVersion,

Doing:

val timeoutSettings =
        ConnectionPoolSettings(context.system.settings.config).withIdleTimeout(10 minutes)

      http.singleRequest(
        HttpRequest(
          method = HttpMethods.POST,
          uri = endpoint,
          entity = rqEntity
        ), settings = timeoutSettings)

I'm getting: akka.stream.scaladsl.TcpIdleTimeoutException: TCP idle-timeout encountered on connection to [localhost:9080], no bytes passed in the last 1 minute.

贡献者指南