-
-
Notifications
You must be signed in to change notification settings - Fork 844
Open
Labels
Description
Issue Summary
I want to remove my sqlite3 database file with code but i have an 'Error: EBUSY: resource busy or locked'. I use sequelize. A big timeout (2sec) after the db.close doesnt change anything.
Thanks.
Steps to Reproduce
1) Init the database
this.db = new Sequelize({ dialect: 'sqlite', storage: this.dbPath, logging: false })
2) Do a query
const trx = await db.transaction()
await db.query(query, { transaction: trx })
await trx.commit()
3) Try to remove the database
if (this.db) await this.db.close()
if (fs.existsSync(dbPath)) fs.unlinkSync(dbPath)
Version
"sequelize": "6.37.7", "sqlite3": "5.1.7"
Node.js Version
v22.14.0
How did you install the library?
npm
I dont know if this is a sequelize or a sqlite3 bug so i created a mirror issue on sequelize repo. Thanks for all.