{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/20460","repository_url":"https://api.github.com/repos/akka/akka","labels_url":"https://api.github.com/repos/akka/akka/issues/20460/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/20460/comments","events_url":"https://api.github.com/repos/akka/akka/issues/20460/events","html_url":"https://github.com/akka/akka/issues/20460","id":153345253,"number":20460,"title":"Akka Flow hangs when making multiple http requests via connection pool","user":{"login":"cppexpert","id":1280853,"avatar_url":"https://avatars.githubusercontent.com/u/1280853?v=3","gravatar_id":"","url":"https://api.github.com/users/cppexpert","html_url":"https://github.com/cppexpert","followers_url":"https://api.github.com/users/cppexpert/followers","following_url":"https://api.github.com/users/cppexpert/following{/other_user}","gists_url":"https://api.github.com/users/cppexpert/gists{/gist_id}","starred_url":"https://api.github.com/users/cppexpert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cppexpert/subscriptions","organizations_url":"https://api.github.com/users/cppexpert/orgs","repos_url":"https://api.github.com/users/cppexpert/repos","events_url":"https://api.github.com/users/cppexpert/events{/privacy}","received_events_url":"https://api.github.com/users/cppexpert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-05T23:01:24Z","updated_at":"2016-05-08T07:24:17Z","closed_at":null,"body":"I'm using Akka 2.4.4 and trying to move from Apache HttpAsyncClient (unsuccessfully).\r\n\r\nBelow is simplified version of code that I use in my project.\r\n\r\nThe problem is that it hangs if I send more than 1-3 requests to the flow. So far after 6 hours of debugging I couldn't even locate the problem. I don't see exceptions, error logs, events in Decider. NOTHING :)\r\n\r\nI tried reducing `connection-timeout` setting to 1s thinking that maybe it's waiting for response from the server but it didn't help.\r\n\r\nWhat am I doing wrong ?\r\n\r\n```scala\r\nimport akka.actor.ActorSystem\r\nimport akka.http.scaladsl.Http\r\nimport akka.http.scaladsl.model.headers.Referer\r\nimport akka.http.scaladsl.model.{HttpRequest, HttpResponse}\r\nimport akka.http.scaladsl.settings.ConnectionPoolSettings\r\nimport akka.stream.Supervision.Decider\r\nimport akka.stream.scaladsl.{Sink, Source}\r\nimport akka.stream.{ActorAttributes, Supervision}\r\nimport com.typesafe.config.ConfigFactory\r\n\r\nimport scala.collection.immutable.{Seq => imSeq}\r\nimport scala.concurrent.{Await, Future}\r\nimport scala.concurrent.duration.Duration\r\nimport scala.util.Try\r\n\r\nobject Main {\r\n\r\n  implicit val system = ActorSystem(\"root\")\r\n  implicit val executor = system.dispatcher\r\n  val config = ConfigFactory.load()\r\n\r\n  private val baseDomain = \"www.google.com\"\r\n  private val poolClientFlow = Http()(system).cachedHostConnectionPool[Any](baseDomain, 80, ConnectionPoolSettings(config))\r\n\r\n  private val decider: Decider = {\r\n    case ex =>\r\n      ex.printStackTrace()\r\n      Supervision.Stop\r\n  }\r\n\r\n  private def sendMultipleRequests[T](items: Seq[(HttpRequest, T)]): Future[Seq[(Try[HttpResponse], T)]] =\r\n\r\n    Source.fromIterator(() => items.toIterator)\r\n      .via(poolClientFlow)\r\n      .log(\"Logger\")(log = myAdapter)\r\n      .recoverWith {\r\n        case ex =>\r\n          println(ex)\r\n          null\r\n      }\r\n      .withAttributes(ActorAttributes.supervisionStrategy(decider))\r\n      .runWith(Sink.seq)\r\n      .map { v =>\r\n        println(s\"Got ${v.length} responses in Flow\")\r\n        v.asInstanceOf[Seq[(Try[HttpResponse], T)]]\r\n      }\r\n\r\n  def main(args: Array[String]) {\r\n\r\n    val headers = imSeq(Referer(\"https://www.google.com/\"))\r\n    val reqPair = HttpRequest(uri = \"/intl/en/policies/privacy\").withHeaders(headers) -> \"some req ID\"\r\n    val requests = List.fill(10)(reqPair)\r\n    val qwe = sendMultipleRequests(requests).map { case responses =>\r\n      println(s\"Got ${responses.length} responses\")\r\n\r\n      system.terminate()\r\n    }\r\n\r\n    Await.ready(system.whenTerminated, Duration.Inf)\r\n  }\r\n}\r\n```\r\n\r\nAlso what's up with [proxy](https://github.com/akka/akka/blob/master/akka-http-core/src/main/resources/reference.conf#L146-L150) support ? Doesn't seem to work for me either."},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/217700129","html_url":"https://github.com/akka/akka/issues/20460#issuecomment-217700129","issue_url":"https://api.github.com/repos/akka/akka/issues/20460","id":217700129,"user":{"login":"lolski","id":464164,"avatar_url":"https://avatars.githubusercontent.com/u/464164?v=3","gravatar_id":"","url":"https://api.github.com/users/lolski","html_url":"https://github.com/lolski","followers_url":"https://api.github.com/users/lolski/followers","following_url":"https://api.github.com/users/lolski/following{/other_user}","gists_url":"https://api.github.com/users/lolski/gists{/gist_id}","starred_url":"https://api.github.com/users/lolski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lolski/subscriptions","organizations_url":"https://api.github.com/users/lolski/orgs","repos_url":"https://api.github.com/users/lolski/repos","events_url":"https://api.github.com/users/lolski/events{/privacy}","received_events_url":"https://api.github.com/users/lolski/received_events","type":"User","site_admin":false},"created_at":"2016-05-08T07:24:17Z","updated_at":"2016-05-08T07:24:17Z","body":"Let me have a quick look, maybe I'll be able to found something"}}