{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/universal-search-recommendation/issues/95","repository_url":"https://api.github.com/repos/mozilla/universal-search-recommendation","labels_url":"https://api.github.com/repos/mozilla/universal-search-recommendation/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/universal-search-recommendation/issues/95/comments","events_url":"https://api.github.com/repos/mozilla/universal-search-recommendation/issues/95/events","html_url":"https://github.com/mozilla/universal-search-recommendation/pull/95","id":148430829,"number":95,"title":"Fix #92 __heartbeat__ opens but never closes connections","user":{"login":"mostlygeek","id":83972,"avatar_url":"https://avatars.githubusercontent.com/u/83972?v=3","gravatar_id":"","url":"https://api.github.com/users/mostlygeek","html_url":"https://github.com/mostlygeek","followers_url":"https://api.github.com/users/mostlygeek/followers","following_url":"https://api.github.com/users/mostlygeek/following{/other_user}","gists_url":"https://api.github.com/users/mostlygeek/gists{/gist_id}","starred_url":"https://api.github.com/users/mostlygeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mostlygeek/subscriptions","organizations_url":"https://api.github.com/users/mostlygeek/orgs","repos_url":"https://api.github.com/users/mostlygeek/repos","events_url":"https://api.github.com/users/mostlygeek/events{/privacy}","received_events_url":"https://api.github.com/users/mostlygeek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-14T17:27:54Z","updated_at":"2016-04-14T18:24:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/universal-search-recommendation/pulls/95","html_url":"https://github.com/mozilla/universal-search-recommendation/pull/95","diff_url":"https://github.com/mozilla/universal-search-recommendation/pull/95.diff","patch_url":"https://github.com/mozilla/universal-search-recommendation/pull/95.patch"},"body":"This fix uses a shared Celery app instance for testing state of\r\ndependent services. After testing the celery app's\r\nconnections are explicitly closed.\r\n\r\nNotes on cause:\r\n- the `redis_status()` and `celery_status()` checks create new Celery\r\n  application instances on every test\r\n- the Celery application instances opens up connections to redis but\r\n  these connections are never closed.\r\n- I'm assuming that because the connections are never closed, python\r\n  never GC's them, so they stick around forever"},"comment":{"url":"https://api.github.com/repos/mozilla/universal-search-recommendation/issues/comments/210087699","html_url":"https://github.com/mozilla/universal-search-recommendation/pull/95#issuecomment-210087699","issue_url":"https://api.github.com/repos/mozilla/universal-search-recommendation/issues/95","id":210087699,"user":{"login":"mostlygeek","id":83972,"avatar_url":"https://avatars.githubusercontent.com/u/83972?v=3","gravatar_id":"","url":"https://api.github.com/users/mostlygeek","html_url":"https://github.com/mostlygeek","followers_url":"https://api.github.com/users/mostlygeek/followers","following_url":"https://api.github.com/users/mostlygeek/following{/other_user}","gists_url":"https://api.github.com/users/mostlygeek/gists{/gist_id}","starred_url":"https://api.github.com/users/mostlygeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mostlygeek/subscriptions","organizations_url":"https://api.github.com/users/mostlygeek/orgs","repos_url":"https://api.github.com/users/mostlygeek/repos","events_url":"https://api.github.com/users/mostlygeek/events{/privacy}","received_events_url":"https://api.github.com/users/mostlygeek/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T18:24:30Z","updated_at":"2016-04-14T18:24:30Z","body":"I haven't dug deeply but does the code create a new celery app instance per http request?\r\n\r\nIt seems that the celery app instances try to hold their connections as long as possible and creating lots of them will eventually lead to resource exhaustion. "}}