{"action":"created","comment":{"url":"https://api.github.com/repos/airbnb/airflow/pulls/comments/54115076","id":54115076,"diff_hunk":"@@ -776,3 +778,33 @@ def logger(self):\n             self._logger = logging.root.getChild(self.__class__.__module__ + '.' +self.__class__.__name__)\n             return self._logger\n \n+\n+def get_sqla_engine(pool_size=5, pool_recycle=3600):","path":"airflow/utils.py","position":59,"original_position":59,"commit_id":"d49a1d838d58d7b1304e67785f75d7ad894d96c3","original_commit_id":"d49a1d838d58d7b1304e67785f75d7ad894d96c3","user":{"login":"mistercrunch","id":487433,"avatar_url":"https://avatars.githubusercontent.com/u/487433?v=3","gravatar_id":"","url":"https://api.github.com/users/mistercrunch","html_url":"https://github.com/mistercrunch","followers_url":"https://api.github.com/users/mistercrunch/followers","following_url":"https://api.github.com/users/mistercrunch/following{/other_user}","gists_url":"https://api.github.com/users/mistercrunch/gists{/gist_id}","starred_url":"https://api.github.com/users/mistercrunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistercrunch/subscriptions","organizations_url":"https://api.github.com/users/mistercrunch/orgs","repos_url":"https://api.github.com/users/mistercrunch/repos","events_url":"https://api.github.com/users/mistercrunch/events{/privacy}","received_events_url":"https://api.github.com/users/mistercrunch/received_events","type":"User","site_admin":false},"body":"It should be parameterized but wasn't / and still isn't. I could parameterized it as part of this PR if you think that's in scope. We probably need to allow different settings for the web server and the scheduler(s).","created_at":"2016-02-25T15:48:16Z","updated_at":"2016-02-25T15:48:16Z","html_url":"https://github.com/airbnb/airflow/pull/1021#discussion_r54115076","pull_request_url":"https://api.github.com/repos/airbnb/airflow/pulls/1021","_links":{"self":{"href":"https://api.github.com/repos/airbnb/airflow/pulls/comments/54115076"},"html":{"href":"https://github.com/airbnb/airflow/pull/1021#discussion_r54115076"},"pull_request":{"href":"https://api.github.com/repos/airbnb/airflow/pulls/1021"}}},"pull_request":{"url":"https://api.github.com/repos/airbnb/airflow/pulls/1021","id":59686468,"html_url":"https://github.com/airbnb/airflow/pull/1021","diff_url":"https://github.com/airbnb/airflow/pull/1021.diff","patch_url":"https://github.com/airbnb/airflow/pull/1021.patch","issue_url":"https://api.github.com/repos/airbnb/airflow/issues/1021","number":1021,"state":"open","locked":false,"title":"Making `airflow run` not use a db connection pool","user":{"login":"mistercrunch","id":487433,"avatar_url":"https://avatars.githubusercontent.com/u/487433?v=3","gravatar_id":"","url":"https://api.github.com/users/mistercrunch","html_url":"https://github.com/mistercrunch","followers_url":"https://api.github.com/users/mistercrunch/followers","following_url":"https://api.github.com/users/mistercrunch/following{/other_user}","gists_url":"https://api.github.com/users/mistercrunch/gists{/gist_id}","starred_url":"https://api.github.com/users/mistercrunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistercrunch/subscriptions","organizations_url":"https://api.github.com/users/mistercrunch/orgs","repos_url":"https://api.github.com/users/mistercrunch/repos","events_url":"https://api.github.com/users/mistercrunch/events{/privacy}","received_events_url":"https://api.github.com/users/mistercrunch/received_events","type":"User","site_admin":false},"body":"The goal here is to reduce the number of active database sessions on the metadata database. Note that sqla create database connection pools and that when we have thousands of tasks emitting heartbeats it can lead to way too many connections, ultimately maxing out on the MySQL side. #1002 describes the issue.\r\n\r\nThis PR includes:\r\n* A refactor where `Session` and `engine` sqla objects live in `airflow` instead of `airflow.settings` (those objects really aren't settings, they're just widely used objects)\r\n* Some `airflow.utils` functions to set a NullPool engine in place of the QueuePool engine\r\n* call for `airflow run` to use the NullPool\r\n* Fixing the unit tests to run with LocalExecutor (had to disable the timeout feature)","created_at":"2016-02-17T18:23:31Z","updated_at":"2016-02-25T15:48:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a19a5bedd6b4a1fe2fdabfeb1f1ac9720f3b538","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/airbnb/airflow/pulls/1021/commits","review_comments_url":"https://api.github.com/repos/airbnb/airflow/pulls/1021/comments","review_comment_url":"https://api.github.com/repos/airbnb/airflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbnb/airflow/issues/1021/comments","statuses_url":"https://api.github.com/repos/airbnb/airflow/statuses/d49a1d838d58d7b1304e67785f75d7ad894d96c3","head":{"label":"airbnb:nopool","ref":"nopool","sha":"d49a1d838d58d7b1304e67785f75d7ad894d96c3","user":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":33884891,"name":"airflow","full_name":"airbnb/airflow","owner":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/airflow","description":"Airflow is a system to programmatically author, schedule and monitor data pipelines.","fork":false,"url":"https://api.github.com/repos/airbnb/airflow","forks_url":"https://api.github.com/repos/airbnb/airflow/forks","keys_url":"https://api.github.com/repos/airbnb/airflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/airflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/airflow/teams","hooks_url":"https://api.github.com/repos/airbnb/airflow/hooks","issue_events_url":"https://api.github.com/repos/airbnb/airflow/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/airflow/events","assignees_url":"https://api.github.com/repos/airbnb/airflow/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/airflow/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/airflow/tags","blobs_url":"https://api.github.com/repos/airbnb/airflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/airflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/airflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/airflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/airflow/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/airflow/languages","stargazers_url":"https://api.github.com/repos/airbnb/airflow/stargazers","contributors_url":"https://api.github.com/repos/airbnb/airflow/contributors","subscribers_url":"https://api.github.com/repos/airbnb/airflow/subscribers","subscription_url":"https://api.github.com/repos/airbnb/airflow/subscription","commits_url":"https://api.github.com/repos/airbnb/airflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/airflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/airflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/airflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/airflow/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/airflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/airflow/merges","archive_url":"https://api.github.com/repos/airbnb/airflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/airflow/downloads","issues_url":"https://api.github.com/repos/airbnb/airflow/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/airflow/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/airflow/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/airflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/airflow/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/airflow/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/airflow/deployments","created_at":"2015-04-13T18:04:58Z","updated_at":"2016-02-25T14:43:27Z","pushed_at":"2016-02-25T12:13:06Z","git_url":"git://github.com/airbnb/airflow.git","ssh_url":"git@github.com:airbnb/airflow.git","clone_url":"https://github.com/airbnb/airflow.git","svn_url":"https://github.com/airbnb/airflow","homepage":"","size":8964,"stargazers_count":1991,"watchers_count":1991,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":375,"mirror_url":null,"open_issues_count":179,"forks":375,"open_issues":179,"watchers":1991,"default_branch":"master"}},"base":{"label":"airbnb:master","ref":"master","sha":"2a3e526a30146abc3bb3af36a04ab8b24b48eb76","user":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":33884891,"name":"airflow","full_name":"airbnb/airflow","owner":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/airflow","description":"Airflow is a system to programmatically author, schedule and monitor data pipelines.","fork":false,"url":"https://api.github.com/repos/airbnb/airflow","forks_url":"https://api.github.com/repos/airbnb/airflow/forks","keys_url":"https://api.github.com/repos/airbnb/airflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/airflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/airflow/teams","hooks_url":"https://api.github.com/repos/airbnb/airflow/hooks","issue_events_url":"https://api.github.com/repos/airbnb/airflow/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/airflow/events","assignees_url":"https://api.github.com/repos/airbnb/airflow/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/airflow/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/airflow/tags","blobs_url":"https://api.github.com/repos/airbnb/airflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/airflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/airflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/airflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/airflow/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/airflow/languages","stargazers_url":"https://api.github.com/repos/airbnb/airflow/stargazers","contributors_url":"https://api.github.com/repos/airbnb/airflow/contributors","subscribers_url":"https://api.github.com/repos/airbnb/airflow/subscribers","subscription_url":"https://api.github.com/repos/airbnb/airflow/subscription","commits_url":"https://api.github.com/repos/airbnb/airflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/airflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/airflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/airflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/airflow/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/airflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/airflow/merges","archive_url":"https://api.github.com/repos/airbnb/airflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/airflow/downloads","issues_url":"https://api.github.com/repos/airbnb/airflow/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/airflow/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/airflow/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/airflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/airflow/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/airflow/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/airflow/deployments","created_at":"2015-04-13T18:04:58Z","updated_at":"2016-02-25T14:43:27Z","pushed_at":"2016-02-25T12:13:06Z","git_url":"git://github.com/airbnb/airflow.git","ssh_url":"git@github.com:airbnb/airflow.git","clone_url":"https://github.com/airbnb/airflow.git","svn_url":"https://github.com/airbnb/airflow","homepage":"","size":8964,"stargazers_count":1991,"watchers_count":1991,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":375,"mirror_url":null,"open_issues_count":179,"forks":375,"open_issues":179,"watchers":1991,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbnb/airflow/pulls/1021"},"html":{"href":"https://github.com/airbnb/airflow/pull/1021"},"issue":{"href":"https://api.github.com/repos/airbnb/airflow/issues/1021"},"comments":{"href":"https://api.github.com/repos/airbnb/airflow/issues/1021/comments"},"review_comments":{"href":"https://api.github.com/repos/airbnb/airflow/pulls/1021/comments"},"review_comment":{"href":"https://api.github.com/repos/airbnb/airflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbnb/airflow/pulls/1021/commits"},"statuses":{"href":"https://api.github.com/repos/airbnb/airflow/statuses/d49a1d838d58d7b1304e67785f75d7ad894d96c3"}}}}