sequelize: Unhandled rejection SequelizeConnectionError: Quit inactivity timeout with Node 4.2.1

Here is the whole error trace:

Unhandled rejection SequelizeConnectionError: Quit inactivity timeout
  at Quit._callback (/Users/holdings/Apps/opticon/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:104:30)
  at Quit.Sequence.end (/Users/holdings/Apps/opticon/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
  at /Users/holdings/Apps/opticon/node_modules/mysql/lib/protocol/Protocol.js:393:18
  at Array.forEach (native)
  at /Users/holdings/Apps/opticon/node_modules/mysql/lib/protocol/Protocol.js:392:13
  at doNTCallback0 (node.js:417:9)
  at process._tickCallback (node.js:346:13)

And node --version renders: v4.2.1

I am on Heroku trying to connect to a ClearDB. And here is my instantiation:

db = new Sequelize(config.mysql.database, config.mysql.username, config.mysql.password, {
  host: config.mysql.host,
  dialect: config.mysql.dialect,
  dialectOptions: {
    timeout: 30
  },
  pool: {
    max: 5,
    min: 0,
    idle: 30000
  },
});

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 27 (4 by maintainers)

Commits related to this issue

Most upvoted comments

@mansa-dev thanks for the response! I actually fixed it by using the options: {pool: {maxIdleTime: 120000}}