{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/21587","labels_url":"https://api.github.com/repos/rails/rails/issues/21587/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/21587/comments","events_url":"https://api.github.com/repos/rails/rails/issues/21587/events","html_url":"https://github.com/rails/rails/issues/21587","id":105926646,"number":21587,"title":"ActiveRecord opens an uncontrollable number of threads","user":{"login":"whistlerbrk","id":14322,"avatar_url":"https://avatars.githubusercontent.com/u/14322?v=3","gravatar_id":"","url":"https://api.github.com/users/whistlerbrk","html_url":"https://github.com/whistlerbrk","followers_url":"https://api.github.com/users/whistlerbrk/followers","following_url":"https://api.github.com/users/whistlerbrk/following{/other_user}","gists_url":"https://api.github.com/users/whistlerbrk/gists{/gist_id}","starred_url":"https://api.github.com/users/whistlerbrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whistlerbrk/subscriptions","organizations_url":"https://api.github.com/users/whistlerbrk/orgs","repos_url":"https://api.github.com/users/whistlerbrk/repos","events_url":"https://api.github.com/users/whistlerbrk/events{/privacy}","received_events_url":"https://api.github.com/users/whistlerbrk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/activerecord","name":"activerecord","color":"0b02e1"},{"url":"https://api.github.com/repos/rails/rails/labels/needs%20feedback","name":"needs feedback","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-11T01:04:46Z","updated_at":"2015-09-18T14:59:03Z","closed_at":null,"body":"I've created a gist here: https://gist.github.com/whistlerbrk/a8766e0199333aed1075\r\n\r\nI've been wrestling with this for a while.\r\n\r\nA simple script, a simple simple script which isn't using any queuing libraries.\r\n\r\nCan I no longer use ActiveRecord outside of Rails?"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/141476136","html_url":"https://github.com/rails/rails/issues/21587#issuecomment-141476136","issue_url":"https://api.github.com/repos/rails/rails/issues/21587","id":141476136,"user":{"login":"whistlerbrk","id":14322,"avatar_url":"https://avatars.githubusercontent.com/u/14322?v=3","gravatar_id":"","url":"https://api.github.com/users/whistlerbrk","html_url":"https://github.com/whistlerbrk","followers_url":"https://api.github.com/users/whistlerbrk/followers","following_url":"https://api.github.com/users/whistlerbrk/following{/other_user}","gists_url":"https://api.github.com/users/whistlerbrk/gists{/gist_id}","starred_url":"https://api.github.com/users/whistlerbrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whistlerbrk/subscriptions","organizations_url":"https://api.github.com/users/whistlerbrk/orgs","repos_url":"https://api.github.com/users/whistlerbrk/repos","events_url":"https://api.github.com/users/whistlerbrk/events{/privacy}","received_events_url":"https://api.github.com/users/whistlerbrk/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T14:59:02Z","updated_at":"2015-09-18T14:59:02Z","body":"I just built a new machine so I haven't had time to test this out. I will\nand if that solves my issue I'll close. But I'll likely send a PR for\ndocumentation because it isn't very clear in the edge guide\nOn Sep 18, 2015 9:23 AM, \"Oliver Switzer\" <notifications@github.com> wrote:\n\n> actually, perhaps using connection_pool checkout/checkin will solve your\n> thread spawing issue?\n>\n>     # 2. Manually check out a connection from the pool with\n>     #    ActiveRecord::Base.connection_pool.checkout. You are responsible for\n>     #    returning this connection to the pool when finished by calling\n>     #    ActiveRecord::Base.connection_pool.checkin(connection).\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/rails/rails/issues/21587#issuecomment-141450476>.\n>\n"}}