{"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/45776060","id":45776060,"diff_hunk":"@@ -107,20 +111,25 @@ private object PoolSlot {\n     def waitingForSubscribePending: Receive = {\n       case SubscribePending ⇒\n         exposedPublisher.takePendingSubscribers() foreach (s ⇒ self ! ActorPublisher.Internal.Subscribe(s))\n+        log.debug(\"become unconnected, from subscriber pending\")\n         context.become(unconnected)\n     }\n \n     val unconnected: Receive = {\n-      case OnNext(rc: RequestContext) ⇒\n+      case m @ OnNext(rc: RequestContext) ⇒","path":"akka-http-core/src/main/scala/akka/http/impl/engine/client/PoolSlot.scala","position":93,"original_position":93,"commit_id":"7eb4b7605d7b4154b188341d8bd697d0ba37cd0f","original_commit_id":"7eb4b7605d7b4154b188341d8bd697d0ba37cd0f","user":{"login":"rkuhn","id":470469,"avatar_url":"https://avatars.githubusercontent.com/u/470469?v=3","gravatar_id":"","url":"https://api.github.com/users/rkuhn","html_url":"https://github.com/rkuhn","followers_url":"https://api.github.com/users/rkuhn/followers","following_url":"https://api.github.com/users/rkuhn/following{/other_user}","gists_url":"https://api.github.com/users/rkuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/rkuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkuhn/subscriptions","organizations_url":"https://api.github.com/users/rkuhn/orgs","repos_url":"https://api.github.com/users/rkuhn/repos","events_url":"https://api.github.com/users/rkuhn/events{/privacy}","received_events_url":"https://api.github.com/users/rkuhn/received_events","type":"User","site_admin":false},"body":"debug left-over?","created_at":"2015-11-24T18:42:10Z","updated_at":"2015-11-24T18:42:10Z","html_url":"https://github.com/akka/akka/pull/18973#discussion_r45776060","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/18973","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/45776060"},"html":{"href":"https://github.com/akka/akka/pull/18973#discussion_r45776060"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/18973"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/18973","id":51253185,"html_url":"https://github.com/akka/akka/pull/18973","diff_url":"https://github.com/akka/akka/pull/18973.diff","patch_url":"https://github.com/akka/akka/pull/18973.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/18973","number":18973,"state":"open","locked":false,"title":"[WIP] Failing Connection handling fixes in Http Client","user":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"body":"The 2 problems I found:\r\n- [x] The SlotProcessors may get \"stuck\". It happens when an error (connection error) comes back while still in the `waitingForSubscribePending` state instead of `running` (when becoming unconnected). Then no even would be emitted other than the `Disconnected`, so no error was signalled and the future not completed, making the pipeline get \"stuck\". This happens only rarely, so during tests I guess it slipped through, but in use cases where we send a lot of requests to a not existing host it was always reproducible. This is fixed now.\r\n- [x] Actors leaking. I believe I know where, but somehow can't figure out why this can be happening.\r\n\r\nMore about issue 2: The actors leaking seem to be:\r\n```\r\n           ⌊-> flow-14-31-InternalConnectionFlow RepointableActorRef class akka.stream.impl.fusing.ActorGraphInterpreter status=0 no children\r\n```\r\n\r\nWhich I think to be the `connectionFlow` passed into the `SlotProcessor` from all the way up in the `PoolInterfaceActor`, this guy:\r\n\r\n```scala\r\n    val connectionFlow =\r\n      if (httpsContext.isEmpty) Http().outgoingConnection(host, port, None, settings.connectionSettings, setup.log)\r\n      else Http().outgoingConnectionTls(host, port, None, settings.connectionSettings, httpsContext, setup.log)\r\n\r\n    val poolFlow = PoolFlow(\r\n      Flow[HttpRequest]\r\n        .log(\"BeforeConnectionFlow\").withAttributes(ActorAttributes.createLogLevels(Logging.DebugLevel, Logging.DebugLevel, Logging.DebugLevel))\r\n        .viaMat(connectionFlow)(Keep.right)\r\n```\r\n\r\nOther notes, if the HttpConnection fails as usual, then the:\r\n\r\n```scala\r\n      .via(poolFlow)\r\n      .log(\"AfterPoolFlow\")\r\n```\r\n\r\nfails properly... but here we have a situation where we get the failure via:\r\n\r\n```scala\r\n    case OnNext(ResponseContext(rc, responseTry)) ⇒\r\n      log.debug(\"pool got response = \" + ResponseContext(rc, responseTry))\r\n      rc.responsePromise.complete(responseTry)\r\n      activateIdleTimeoutIfNecessary()\r\n```\r\n\r\ninstead, and I'm not sure what one should do then. Having that said, the actors leak regardless of if this or the other (i.e. \"proper\") failure happens. So I think there's something else wrong. I'm somewhat stuck and out of ideas currently and would appreciate some help if you have an idea what might cause the problem maybe - cc @sirthias @jrudolph @drewhk @rkuhn.\r\n\r\nThanks in advance, I'll continue digging into it but need to make the other PR ready for tomorrows M2 as well.\r\n\r\nWill eventually resolve https://github.com/akka/akka/issues/18311","created_at":"2015-11-19T17:22:05Z","updated_at":"2015-11-24T18:42:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aafe0809ca77964e8d16df0123e1cee2563f1048","assignee":null,"milestone":{"url":"https://api.github.com/repos/akka/akka/milestones/62","html_url":"https://github.com/akka/akka/milestones/http-2.0-M2","labels_url":"https://api.github.com/repos/akka/akka/milestones/62/labels","id":1397529,"number":62,"title":"http-2.0-M2","description":null,"creator":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"open_issues":56,"closed_issues":14,"state":"open","created_at":"2015-11-06T11:45:27Z","updated_at":"2015-11-24T15:27:16Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/akka/akka/pulls/18973/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/18973/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/akka/issues/18973/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/7eb4b7605d7b4154b188341d8bd697d0ba37cd0f","head":{"label":"ktoso:wip-oom-connection-level-ktoso","ref":"wip-oom-connection-level-ktoso","sha":"7eb4b7605d7b4154b188341d8bd697d0ba37cd0f","user":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"repo":{"id":4462204,"name":"akka","full_name":"ktoso/akka","owner":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ktoso/akka","description":"Akka Project","fork":true,"url":"https://api.github.com/repos/ktoso/akka","forks_url":"https://api.github.com/repos/ktoso/akka/forks","keys_url":"https://api.github.com/repos/ktoso/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ktoso/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ktoso/akka/teams","hooks_url":"https://api.github.com/repos/ktoso/akka/hooks","issue_events_url":"https://api.github.com/repos/ktoso/akka/issues/events{/number}","events_url":"https://api.github.com/repos/ktoso/akka/events","assignees_url":"https://api.github.com/repos/ktoso/akka/assignees{/user}","branches_url":"https://api.github.com/repos/ktoso/akka/branches{/branch}","tags_url":"https://api.github.com/repos/ktoso/akka/tags","blobs_url":"https://api.github.com/repos/ktoso/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ktoso/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ktoso/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/ktoso/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ktoso/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/ktoso/akka/languages","stargazers_url":"https://api.github.com/repos/ktoso/akka/stargazers","contributors_url":"https://api.github.com/repos/ktoso/akka/contributors","subscribers_url":"https://api.github.com/repos/ktoso/akka/subscribers","subscription_url":"https://api.github.com/repos/ktoso/akka/subscription","commits_url":"https://api.github.com/repos/ktoso/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/ktoso/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/ktoso/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/ktoso/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/ktoso/akka/contents/{+path}","compare_url":"https://api.github.com/repos/ktoso/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ktoso/akka/merges","archive_url":"https://api.github.com/repos/ktoso/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ktoso/akka/downloads","issues_url":"https://api.github.com/repos/ktoso/akka/issues{/number}","pulls_url":"https://api.github.com/repos/ktoso/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/ktoso/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/ktoso/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ktoso/akka/labels{/name}","releases_url":"https://api.github.com/repos/ktoso/akka/releases{/id}","created_at":"2012-05-27T14:05:17Z","updated_at":"2015-04-03T11:58:56Z","pushed_at":"2015-11-24T16:40:29Z","git_url":"git://github.com/ktoso/akka.git","ssh_url":"git@github.com:ktoso/akka.git","clone_url":"https://github.com/ktoso/akka.git","svn_url":"https://github.com/ktoso/akka","homepage":"http://akka.io","size":170002,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"akka:release-2.3-dev","ref":"release-2.3-dev","sha":"3fe9e49407b9f36a9cacb62aa79f681a3befd3e7","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","created_at":"2009-02-16T12:51:54Z","updated_at":"2015-11-24T18:28:15Z","pushed_at":"2015-11-24T16:40:32Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":177529,"stargazers_count":4739,"watchers_count":4739,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1422,"mirror_url":null,"open_issues_count":788,"forks":1422,"open_issues":788,"watchers":4739,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/18973"},"html":{"href":"https://github.com/akka/akka/pull/18973"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/18973"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/18973/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/18973/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/18973/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/7eb4b7605d7b4154b188341d8bd697d0ba37cd0f"}}}}