TimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
See original GitHub issueEnvironment
Knex version: 0.15.2 Database: sqlite3 OS: Ubuntu 18
I’m getting lots of errors like TimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
Any ideas? All my code lives in this one file: https://github.com/umaar/wiki-globe/blob/master/index.js - that code powers this globe which I posted in a Hacker News comment and in turn led to the discovery of such error.
An example query looks like this:
await knex('edits').insert([{
field1: JSON.stringify(data),
field2: 'field2'
}]);
Does sqlite3 only allow a single connection to it because it’s file-based? I’ll try adding .transacting() calls to see if that makes a difference.
I guess it comes down to: some technical limitation with sqlite3 (maybe lack of pooling?) or some badly written code DB/queries on my part! Any insight you have would be much appreciated, thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:47 (9 by maintainers)
Top Related StackOverflow Question
I solved this problem with these versions:
@batadamnjanovic Thank you so much! I’ve been pulling my hair trying to understand what the hell happened. Upgrading to the latest
pgdid the trick.