Skip to content

pool connection never destroy after idle milliseconds #7882

Closed

Description

@fourcels

What you are doing?

const Sequelize = require('sequelize');
const sequelize = new Sequelize($mysqlUri, {
  pool: {
    max: 5,
    min: 0,
    idle: 10000
  }
})

sequelize
  .authenticate()
  .then(() => {
    console.log('Connection has been established successfully.');
  })
  .catch(err => {
    console.error('Unable to connect to the database:', err);
  });

What do you expect to happen?

pool connection should be destroyed after idle(10000 milliseconds)

What is actually happening?

pool connection hadn't destroyed after idle(10000 milliseconds)

Dialect: mysql
__Database version:
__Sequelize version:4.2.1

ps

I had found a option evictionRunIntervalMillis in generic-pool
evictionRunIntervalMillis: How often to run eviction checks. Default: 0 (does not run).
sequelize options need add this option to control idle connection destroy

Activity

  1. added
    type: bug
    good first issue
    on Jul 10, 2017
  2. v0y4g3r commented on Jul 10, 2017

    @v0y4g3r

    Plz check if my pull request fixed you problem

  3. swordfish444 commented on Jul 10, 2017

    @swordfish444
    Contributor

    @RayneHwang Please see the comments on your PR. Once you've resolved the formatting error, lets get this tested and scheduled for release.

  4. sushantdhiman commented on Aug 10, 2017

    @sushantdhiman
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuetype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions