{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/2113","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/2113/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/2113/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/2113/events","html_url":"https://github.com/sequelize/sequelize/issues/2113","id":39404502,"node_id":"MDU6SXNzdWUzOTQwNDUwMg==","number":2113,"title":"Preferred way to handle reconnect","user":{"login":"chris-rock","id":1178413,"node_id":"MDQ6VXNlcjExNzg0MTM=","avatar_url":"https://avatars3.githubusercontent.com/u/1178413?v=4","gravatar_id":"","url":"https://api.github.com/users/chris-rock","html_url":"https://github.com/chris-rock","followers_url":"https://api.github.com/users/chris-rock/followers","following_url":"https://api.github.com/users/chris-rock/following{/other_user}","gists_url":"https://api.github.com/users/chris-rock/gists{/gist_id}","starred_url":"https://api.github.com/users/chris-rock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris-rock/subscriptions","organizations_url":"https://api.github.com/users/chris-rock/orgs","repos_url":"https://api.github.com/users/chris-rock/repos","events_url":"https://api.github.com/users/chris-rock/events{/privacy}","received_events_url":"https://api.github.com/users/chris-rock/received_events","type":"User","site_admin":false},"labels":[{"id":28979733,"node_id":"MDU6TGFiZWwyODk3OTczMw==","url":"https://api.github.com/repos/sequelize/sequelize/labels/feature","name":"feature","color":"0b02e1","default":false}],"state":"closed","locked":false,"assignee":{"login":"mickhansen","id":699049,"node_id":"MDQ6VXNlcjY5OTA0OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/699049?v=4","gravatar_id":"","url":"https://api.github.com/users/mickhansen","html_url":"https://github.com/mickhansen","followers_url":"https://api.github.com/users/mickhansen/followers","following_url":"https://api.github.com/users/mickhansen/following{/other_user}","gists_url":"https://api.github.com/users/mickhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/mickhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickhansen/subscriptions","organizations_url":"https://api.github.com/users/mickhansen/orgs","repos_url":"https://api.github.com/users/mickhansen/repos","events_url":"https://api.github.com/users/mickhansen/events{/privacy}","received_events_url":"https://api.github.com/users/mickhansen/received_events","type":"User","site_admin":false},"assignees":[{"login":"mickhansen","id":699049,"node_id":"MDQ6VXNlcjY5OTA0OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/699049?v=4","gravatar_id":"","url":"https://api.github.com/users/mickhansen","html_url":"https://github.com/mickhansen","followers_url":"https://api.github.com/users/mickhansen/followers","following_url":"https://api.github.com/users/mickhansen/following{/other_user}","gists_url":"https://api.github.com/users/mickhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/mickhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickhansen/subscriptions","organizations_url":"https://api.github.com/users/mickhansen/orgs","repos_url":"https://api.github.com/users/mickhansen/repos","events_url":"https://api.github.com/users/mickhansen/events{/privacy}","received_events_url":"https://api.github.com/users/mickhansen/received_events","type":"User","site_admin":false}],"milestone":null,"comments":70,"created_at":"2014-08-04T09:38:27Z","updated_at":"2018-09-27T20:57:40Z","closed_at":"2018-02-06T03:32:31Z","author_association":"NONE","body":"In case the db connection is lost, we need to reconnect to the database. I couldn't find a preferred way to handle this issue. Do you have a best practice? The issue can be solved on various ways:\n- handle in sequelize\n- handle in db module like pg\n- handle this issue outside of nodejs with connection handler\n\nThanks in advance\n"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/425240722","html_url":"https://github.com/sequelize/sequelize/issues/2113#issuecomment-425240722","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/2113","id":425240722,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTI0MDcyMg==","user":{"login":"kingjerod","id":2287252,"node_id":"MDQ6VXNlcjIyODcyNTI=","avatar_url":"https://avatars0.githubusercontent.com/u/2287252?v=4","gravatar_id":"","url":"https://api.github.com/users/kingjerod","html_url":"https://github.com/kingjerod","followers_url":"https://api.github.com/users/kingjerod/followers","following_url":"https://api.github.com/users/kingjerod/following{/other_user}","gists_url":"https://api.github.com/users/kingjerod/gists{/gist_id}","starred_url":"https://api.github.com/users/kingjerod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingjerod/subscriptions","organizations_url":"https://api.github.com/users/kingjerod/orgs","repos_url":"https://api.github.com/users/kingjerod/repos","events_url":"https://api.github.com/users/kingjerod/events{/privacy}","received_events_url":"https://api.github.com/users/kingjerod/received_events","type":"User","site_admin":false},"created_at":"2018-09-27T20:57:40Z","updated_at":"2018-09-27T20:57:40Z","author_association":"NONE","body":"I ended up listening for a `SequelizeConnectionRefusedError` or `SequelizeConnectionError` in my middleware and if it detects that it restarts the process. A bit hacky but it works. "}}
{"actor":{"display_login":"kingjerod"}}