DB connection fails to close
See original GitHub issueI’m using fakeIndexedDB for testing. I am unable to close db connections after calling db.close()
. I set an onClose
event listener to indicate when the db closes but it never fires. I need to upgrade the db in one of my tests, I can’t do this with other connections open. So, I set the db to close onversionchange
but alas, the db doesn’t close and upgrade request is blocked.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
vb.net - Database Connection Close Error - Stack Overflow
1 Answer 1 · 1) I concur that your connection object needs to be LOCAL to the method. · 2) Somewhere along VS...
Read more >How to deal with closed connections in database pool
Such closed connections (commonly known as "infected" connections) may be caused by the database, which closes a connection due to a "idle connection...
Read more >Handling java.sql.SQLRecoverableException: Closed ...
This error message indicates that the connection used by the backup task (or any other long-running operation that relies on a single database ......
Read more >Problem : can't close a database connection — oracle-tech
Hi, I'am using connection pool under weblogic 6 and I can't close the connection when a SQL exception occures. The connection always stay ......
Read more >How costly is opening and closing of a DB connection?
The max value for it is 100. When client closes connection, it is returned to the cache. When a new connection opens, it...
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
Actually, this doesn’t seem to be a bug at all. According to MDN,
onclose
only fires on unexpected closes.It sounds like your original use case is for upgrading a db when other connections are open. I believe what you want is
onversionchange
, which fires “when a database structure change […] was requested elsewhere”got it 👍 👌