{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/9845","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/9845/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/9845/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/9845/events","html_url":"https://github.com/sequelize/sequelize/issues/9845","id":354259655,"node_id":"MDU6SXNzdWUzNTQyNTk2NTU=","number":9845,"title":"getConnection fails with replication when Master disconnected","user":{"login":"lynnlam","id":12760788,"node_id":"MDQ6VXNlcjEyNzYwNzg4","avatar_url":"https://avatars3.githubusercontent.com/u/12760788?v=4","gravatar_id":"","url":"https://api.github.com/users/lynnlam","html_url":"https://github.com/lynnlam","followers_url":"https://api.github.com/users/lynnlam/followers","following_url":"https://api.github.com/users/lynnlam/following{/other_user}","gists_url":"https://api.github.com/users/lynnlam/gists{/gist_id}","starred_url":"https://api.github.com/users/lynnlam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lynnlam/subscriptions","organizations_url":"https://api.github.com/users/lynnlam/orgs","repos_url":"https://api.github.com/users/lynnlam/repos","events_url":"https://api.github.com/users/lynnlam/events{/privacy}","received_events_url":"https://api.github.com/users/lynnlam/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-27T10:10:01Z","updated_at":"2018-08-28T15:39:36Z","closed_at":"2018-08-28T15:39:36Z","author_association":"NONE","body":"<!--\r\n\r\nPlease note this is an issue tracker, not a support forum.\r\nFor general questions, please use StackOverflow or Slack.\r\n\r\nFor bugs, please fill out the template below.\r\n\r\n-->\r\n\r\n## What are you doing?\r\n<!-- Post a minimal, self-contained code sample that reproduces the issue, including models and associations -->\r\nWhen using replication, The connection always checking master.\r\n\r\n```js\r\nnew Sequelize('database-name', null, null, {\r\n        dialect: 'mysql',\r\n        port: 3306,\r\n        replication: {\r\n            read: [{\r\n                host: Slave,\r\n                username: 'username',\r\n                password: 'password',\r\n                pool: {}\r\n            }],\r\n            write: {\r\n                host:  Master,\r\n                username: 'username',\r\n                password: 'password',\r\n                pool: {}\r\n            }\r\n        },\r\n        pool: {\r\n            maxConnections: 20,\r\n            maxIdleTime: 30000\r\n        }\r\n});\r\n```\r\n\r\n## What do you expect to happen?\r\nWhen options.type is SELECT.  The connection should be checking slave (replication.read).\r\n\r\n## What is actually happening?\r\nWhen Master disconnected. The connection always return \"connect ECONNREFUSED MASTER\"\r\n"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/416634919","html_url":"https://github.com/sequelize/sequelize/issues/9845#issuecomment-416634919","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/9845","id":416634919,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjYzNDkxOQ==","user":{"login":"sushantdhiman","id":9989487,"node_id":"MDQ6VXNlcjk5ODk0ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/9989487?v=4","gravatar_id":"","url":"https://api.github.com/users/sushantdhiman","html_url":"https://github.com/sushantdhiman","followers_url":"https://api.github.com/users/sushantdhiman/followers","following_url":"https://api.github.com/users/sushantdhiman/following{/other_user}","gists_url":"https://api.github.com/users/sushantdhiman/gists{/gist_id}","starred_url":"https://api.github.com/users/sushantdhiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sushantdhiman/subscriptions","organizations_url":"https://api.github.com/users/sushantdhiman/orgs","repos_url":"https://api.github.com/users/sushantdhiman/repos","events_url":"https://api.github.com/users/sushantdhiman/events{/privacy}","received_events_url":"https://api.github.com/users/sushantdhiman/received_events","type":"User","site_admin":false},"created_at":"2018-08-28T15:39:36Z","updated_at":"2018-08-28T15:39:36Z","author_association":"MEMBER","body":"Follow template"}}
{"actor":{"display_login":"sushantdhiman"}}