Disconnecting and shutting down database connection
See original GitHub issueHey,
I’m writing a cluster manager and zero downtime restart library and had a need to shut down the database connection pool that Knex set up. How would I do that?
I do see poolInstance.drain
and destroyAllNow
used in the base.js
file. Are those meant to form the public interface for shutting down Knex?
Issue Analytics
- State:
- Created 10 years ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
Shutting Down a Database
No new connections are allowed, nor are new transactions allowed to be started, after the statement is issued. · Any uncommitted transactions are...
Read more >Use SHUTDOWN IMMEDIATE to Shut Down the Oracle ...
During the SHUTDOWN IMMEDIATE , all the connected sessions are disconnected immediately, all uncommitted transactions are rolled back, and the database ...
Read more >Disconnect from Database - DBeaver Documentation
To disconnect from all active connections, click Database -> Disconnect All on the main menu.
Read more >Database Host Server Connections Drop after a Period ... - IBM
Connections made by database host server clients such as IBM Toolbox for Java JDBC or IBM i Access Client Solutions ODBC are dropped...
Read more >dbDisconnect: Disconnect (close) a connection in DBI - Rdrr.io
In DBI: R Database Interface. dbDisconnect, R Documentation. Disconnect (close) a connection. Description. This closes the connection ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 for @gregbty
The knex instance is not destroyed after running seed. Any ideas?
Yep, covered now in: http://knexjs.org/#Installation-pooling