{"action":"opened","number":454,"pull_request":{"url":"https://api.github.com/repos/PRX/cms.prx.org/pulls/454","id":216025881,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MDI1ODgx","html_url":"https://github.com/PRX/cms.prx.org/pull/454","diff_url":"https://github.com/PRX/cms.prx.org/pull/454.diff","patch_url":"https://github.com/PRX/cms.prx.org/pull/454.patch","issue_url":"https://api.github.com/repos/PRX/cms.prx.org/issues/454","number":454,"state":"open","locked":false,"title":"Surface worker errors in logs","user":{"login":"svevang","id":329012,"node_id":"MDQ6VXNlcjMyOTAxMg==","avatar_url":"https://avatars0.githubusercontent.com/u/329012?v=4","gravatar_id":"","url":"https://api.github.com/users/svevang","html_url":"https://github.com/svevang","followers_url":"https://api.github.com/users/svevang/followers","following_url":"https://api.github.com/users/svevang/following{/other_user}","gists_url":"https://api.github.com/users/svevang/gists{/gist_id}","starred_url":"https://api.github.com/users/svevang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svevang/subscriptions","organizations_url":"https://api.github.com/users/svevang/orgs","repos_url":"https://api.github.com/users/svevang/repos","events_url":"https://api.github.com/users/svevang/events{/privacy}","received_events_url":"https://api.github.com/users/svevang/received_events","type":"User","site_admin":false},"body":"This PR has the goal of reducing/eliminating exceptions within the shoryuken worker machinery. Assuming that we are allowing long-running jobs (20-30 seconds) on our worker queues, then for big job batches, it's possible to consume all of our database connections. Assuming the db pool < # worker and a short db pool request timeout.\r\n\r\nFirst, this PR contains a minor tweak to surface exceptions in the worker log. Looking something like:\r\n```\r\nERROR: Process died, reason: Error while trying to deserialize arguments: could not obtain a database connection within 5.000 seconds (waited 5.001 seconds)\r\n```\r\nThis should allow us to get a handle on how many workers are dying.\r\n\r\nSecondly, we set up a env/secrets change for the workers: increase the `DATABASE_POOL_SIZE` to match `CONCURRENCY` (per the recommendations of shoryuken) plus the database needs of `say_when`.  \r\n\r\n","created_at":"2018-09-17T15:37:27Z","updated_at":"2018-09-17T15:37:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PRX/cms.prx.org/pulls/454/commits","review_comments_url":"https://api.github.com/repos/PRX/cms.prx.org/pulls/454/comments","review_comment_url":"https://api.github.com/repos/PRX/cms.prx.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PRX/cms.prx.org/issues/454/comments","statuses_url":"https://api.github.com/repos/PRX/cms.prx.org/statuses/c87ce53849c32c1113d2bf3f38a6efe605f99b66","head":{"label":"PRX:feat/fixup-worker-crashes","ref":"feat/fixup-worker-crashes","sha":"c87ce53849c32c1113d2bf3f38a6efe605f99b66","user":{"login":"PRX","id":160453,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDQ1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/160453?v=4","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"repo":{"id":14878369,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg3ODM2OQ==","name":"cms.prx.org","full_name":"PRX/cms.prx.org","private":false,"owner":{"login":"PRX","id":160453,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDQ1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/160453?v=4","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PRX/cms.prx.org","description":"CMS API for PRX","fork":false,"url":"https://api.github.com/repos/PRX/cms.prx.org","forks_url":"https://api.github.com/repos/PRX/cms.prx.org/forks","keys_url":"https://api.github.com/repos/PRX/cms.prx.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PRX/cms.prx.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PRX/cms.prx.org/teams","hooks_url":"https://api.github.com/repos/PRX/cms.prx.org/hooks","issue_events_url":"https://api.github.com/repos/PRX/cms.prx.org/issues/events{/number}","events_url":"https://api.github.com/repos/PRX/cms.prx.org/events","assignees_url":"https://api.github.com/repos/PRX/cms.prx.org/assignees{/user}","branches_url":"https://api.github.com/repos/PRX/cms.prx.org/branches{/branch}","tags_url":"https://api.github.com/repos/PRX/cms.prx.org/tags","blobs_url":"https://api.github.com/repos/PRX/cms.prx.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PRX/cms.prx.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PRX/cms.prx.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/PRX/cms.prx.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PRX/cms.prx.org/statuses/{sha}","languages_url":"https://api.github.com/repos/PRX/cms.prx.org/languages","stargazers_url":"https://api.github.com/repos/PRX/cms.prx.org/stargazers","contributors_url":"https://api.github.com/repos/PRX/cms.prx.org/contributors","subscribers_url":"https://api.github.com/repos/PRX/cms.prx.org/subscribers","subscription_url":"https://api.github.com/repos/PRX/cms.prx.org/subscription","commits_url":"https://api.github.com/repos/PRX/cms.prx.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/PRX/cms.prx.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/PRX/cms.prx.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/PRX/cms.prx.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/PRX/cms.prx.org/contents/{+path}","compare_url":"https://api.github.com/repos/PRX/cms.prx.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PRX/cms.prx.org/merges","archive_url":"https://api.github.com/repos/PRX/cms.prx.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PRX/cms.prx.org/downloads","issues_url":"https://api.github.com/repos/PRX/cms.prx.org/issues{/number}","pulls_url":"https://api.github.com/repos/PRX/cms.prx.org/pulls{/number}","milestones_url":"https://api.github.com/repos/PRX/cms.prx.org/milestones{/number}","notifications_url":"https://api.github.com/repos/PRX/cms.prx.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PRX/cms.prx.org/labels{/name}","releases_url":"https://api.github.com/repos/PRX/cms.prx.org/releases{/id}","deployments_url":"https://api.github.com/repos/PRX/cms.prx.org/deployments","created_at":"2013-12-02T23:48:10Z","updated_at":"2018-09-13T20:15:23Z","pushed_at":"2018-09-17T15:13:12Z","git_url":"git://github.com/PRX/cms.prx.org.git","ssh_url":"git@github.com:PRX/cms.prx.org.git","clone_url":"https://github.com/PRX/cms.prx.org.git","svn_url":"https://github.com/PRX/cms.prx.org","homepage":"https://cms.prx.org","size":2530,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":41,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":3,"open_issues":41,"watchers":3,"default_branch":"master"}},"base":{"label":"PRX:master","ref":"master","sha":"056db0066b223ad69b4c96702c646ae7c79ebc14","user":{"login":"PRX","id":160453,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDQ1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/160453?v=4","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"repo":{"id":14878369,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg3ODM2OQ==","name":"cms.prx.org","full_name":"PRX/cms.prx.org","private":false,"owner":{"login":"PRX","id":160453,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDQ1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/160453?v=4","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PRX/cms.prx.org","description":"CMS API for PRX","fork":false,"url":"https://api.github.com/repos/PRX/cms.prx.org","forks_url":"https://api.github.com/repos/PRX/cms.prx.org/forks","keys_url":"https://api.github.com/repos/PRX/cms.prx.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PRX/cms.prx.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PRX/cms.prx.org/teams","hooks_url":"https://api.github.com/repos/PRX/cms.prx.org/hooks","issue_events_url":"https://api.github.com/repos/PRX/cms.prx.org/issues/events{/number}","events_url":"https://api.github.com/repos/PRX/cms.prx.org/events","assignees_url":"https://api.github.com/repos/PRX/cms.prx.org/assignees{/user}","branches_url":"https://api.github.com/repos/PRX/cms.prx.org/branches{/branch}","tags_url":"https://api.github.com/repos/PRX/cms.prx.org/tags","blobs_url":"https://api.github.com/repos/PRX/cms.prx.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PRX/cms.prx.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PRX/cms.prx.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/PRX/cms.prx.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PRX/cms.prx.org/statuses/{sha}","languages_url":"https://api.github.com/repos/PRX/cms.prx.org/languages","stargazers_url":"https://api.github.com/repos/PRX/cms.prx.org/stargazers","contributors_url":"https://api.github.com/repos/PRX/cms.prx.org/contributors","subscribers_url":"https://api.github.com/repos/PRX/cms.prx.org/subscribers","subscription_url":"https://api.github.com/repos/PRX/cms.prx.org/subscription","commits_url":"https://api.github.com/repos/PRX/cms.prx.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/PRX/cms.prx.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/PRX/cms.prx.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/PRX/cms.prx.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/PRX/cms.prx.org/contents/{+path}","compare_url":"https://api.github.com/repos/PRX/cms.prx.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PRX/cms.prx.org/merges","archive_url":"https://api.github.com/repos/PRX/cms.prx.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PRX/cms.prx.org/downloads","issues_url":"https://api.github.com/repos/PRX/cms.prx.org/issues{/number}","pulls_url":"https://api.github.com/repos/PRX/cms.prx.org/pulls{/number}","milestones_url":"https://api.github.com/repos/PRX/cms.prx.org/milestones{/number}","notifications_url":"https://api.github.com/repos/PRX/cms.prx.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PRX/cms.prx.org/labels{/name}","releases_url":"https://api.github.com/repos/PRX/cms.prx.org/releases{/id}","deployments_url":"https://api.github.com/repos/PRX/cms.prx.org/deployments","created_at":"2013-12-02T23:48:10Z","updated_at":"2018-09-13T20:15:23Z","pushed_at":"2018-09-17T15:13:12Z","git_url":"git://github.com/PRX/cms.prx.org.git","ssh_url":"git@github.com:PRX/cms.prx.org.git","clone_url":"https://github.com/PRX/cms.prx.org.git","svn_url":"https://github.com/PRX/cms.prx.org","homepage":"https://cms.prx.org","size":2530,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":41,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":3,"open_issues":41,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PRX/cms.prx.org/pulls/454"},"html":{"href":"https://github.com/PRX/cms.prx.org/pull/454"},"issue":{"href":"https://api.github.com/repos/PRX/cms.prx.org/issues/454"},"comments":{"href":"https://api.github.com/repos/PRX/cms.prx.org/issues/454/comments"},"review_comments":{"href":"https://api.github.com/repos/PRX/cms.prx.org/pulls/454/comments"},"review_comment":{"href":"https://api.github.com/repos/PRX/cms.prx.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PRX/cms.prx.org/pulls/454/commits"},"statuses":{"href":"https://api.github.com/repos/PRX/cms.prx.org/statuses/c87ce53849c32c1113d2bf3f38a6efe605f99b66"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"svevang"}}