{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/8275","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/8275/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/8275/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/8275/events","html_url":"https://github.com/ManageIQ/manageiq/pull/8275","id":151256567,"number":8275,"title":"Add db connection checkin/checkout debug logging.","user":{"login":"jrafanie","id":19339,"avatar_url":"https://avatars.githubusercontent.com/u/19339?v=3","gravatar_id":"","url":"https://api.github.com/users/jrafanie","html_url":"https://github.com/jrafanie","followers_url":"https://api.github.com/users/jrafanie/followers","following_url":"https://api.github.com/users/jrafanie/following{/other_user}","gists_url":"https://api.github.com/users/jrafanie/gists{/gist_id}","starred_url":"https://api.github.com/users/jrafanie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrafanie/subscriptions","organizations_url":"https://api.github.com/users/jrafanie/orgs","repos_url":"https://api.github.com/users/jrafanie/repos","events_url":"https://api.github.com/users/jrafanie/events{/privacy}","received_events_url":"https://api.github.com/users/jrafanie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/core/workers","name":"core/workers","color":"5319e7"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-26T22:42:52Z","updated_at":"2016-04-28T18:42:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/8275","html_url":"https://github.com/ManageIQ/manageiq/pull/8275","diff_url":"https://github.com/ManageIQ/manageiq/pull/8275.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/8275.patch"},"body":"Related to #7801\r\n\r\nNow that we use puma, which handles requests in threads, and we have multiple\r\nservices making requests to puma, the ops UI, self service UI, and the REST API,\r\nwe need logging of connection pool usage to try to track down misconfiguration or\r\na bug.\r\n\r\nFor example, if we have need to configure the puma min/max thread count (config/puma.rb)\r\n(5,5 currently) to work correctly with the rails connection pool size of 5,\r\nwe need a way to know if we have too many/few puma threads or connection pool size.\r\n\r\n```\r\n[----] D, [2016-04-26T18:30:08.382027 #30792:b8923c] DEBUG -- : MIQ(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#log_after_checkout) pool_size: 5, connections: 5, in use: 3, waiting_in_queue: 0\r\n[----] D, [2016-04-26T18:30:08.428311 #30792:b8937c] DEBUG -- : MIQ(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#log_after_checkout) pool_size: 5, connections: 5, in use: 5, waiting_in_queue: 2\r\n[----] D, [2016-04-26T18:30:08.449720 #30792:b89480] DEBUG -- : MIQ(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#log_after_checkout) pool_size: 5, connections: 5, in use: 5, waiting_in_queue: 2\r\n[----] D, [2016-04-26T18:30:13.566289 #30792:b89480] DEBUG -- : MIQ(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#log_after_checkin) pool_size: 5, connections: 5, in use: 4, waiting_in_queue: 0\r\n```\r\n\r\nThis might need to be backported as it could be useful for debugging."},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/215523662","html_url":"https://github.com/ManageIQ/manageiq/pull/8275#issuecomment-215523662","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/8275","id":215523662,"user":{"login":"miq-bot","id":7806257,"avatar_url":"https://avatars.githubusercontent.com/u/7806257?v=3","gravatar_id":"","url":"https://api.github.com/users/miq-bot","html_url":"https://github.com/miq-bot","followers_url":"https://api.github.com/users/miq-bot/followers","following_url":"https://api.github.com/users/miq-bot/following{/other_user}","gists_url":"https://api.github.com/users/miq-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/miq-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miq-bot/subscriptions","organizations_url":"https://api.github.com/users/miq-bot/orgs","repos_url":"https://api.github.com/users/miq-bot/repos","events_url":"https://api.github.com/users/miq-bot/events{/privacy}","received_events_url":"https://api.github.com/users/miq-bot/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T18:42:27Z","updated_at":"2016-04-28T18:42:27Z","body":"<rubocop />Checked commit https://github.com/jrafanie/manageiq/commit/efebca05107035a02bd3d0ce839dd04e76f4bfd5 with ruby 2.2.3, rubocop 0.37.2, and haml-lint 0.16.1\n1 file checked, 0 offenses detected\nEverything looks good. :+1:\n"}}