Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

373
Views
sequelize.js how can I reconnect after close

I use the sequelize.js to connect sqlite, but I must to close the connect because I want to modify the sqlite's file. Windows cannot modify the file when it's opening.

I create the object like this:

const sequelize = new Sequelize('database', null, null, {
    dialect: 'sqlite',
    storage: 'db.sql',
    define: {
      timestamps: false,
      freezeTableName: true
    },
    dialectModule: sqlite3
  })

And when I close the connect, I cannot reconnect sqlite by the original object. I try to use the ConnectionManager initPools, but it does not work.

sequelize.close()
// do something ...
sequelize.connectionManager.initPools()
sequelize.authenticate() // raise the error by disconnect
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!