question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Close properly Sqlite connections

See original GitHub issue

What you are doing?

Using Sequelize with Sqlite.

What do you expect to happen?

I want the connection with Sqlite to be closed properly and the file *shm and *wal deleted.

What is actually happening?

*shm and *wal files persist after termination of the process.

__Dialect: sqlite __Database version: 3.1.6 __Sequelize version: 3.24

A PR would be accepted? I would implement disconnect() in the sqlite connection manager. disconnect() would call close() on all this.connections

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
francescoinfantecommented, Nov 4, 2016

No, sequelize.close() with sqlite does nothing. sequelize.close() calls this.connectionManager.close() this.connectionManager.close() calls this.onProcessExit() this.onProcessExit() will do something only if this.pool is defined. But it’s undefined for sqlite.

1reaction
Deilancommented, Sep 5, 2017

Not stale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Closing A Database Connection - SQLite
Ideally, applications should finalize all prepared statements, close all BLOB handles, and finish all sqlite3_backup objects associated with the sqlite3 object ...
Read more >
What if I don't close the database connection in Python SQLite
In answer to the specific question of what happens if you do not close a SQLite database, the answer is quite simple and...
Read more >
Thread: Closing correctly sqlite connection? - Qt Centre Forum
Hi, I want to delete a sqlite database, on linux and mac i have no problems, but in windows i can't delete the...
Read more >
Is there a SQLite database open/close best practice ... - Reddit
As the title says, i have this doubt: are there guidelines which show when it's best to open/close the connection to the database?...
Read more >
sqlite3 — DB-API 2.0 interface for SQLite databases — Python ...
Call sqlite3.connect() to to create a connection to the database ... has been written to disk by calling con.close() to close the existing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found