Error:: Knex:warning - Pool2 - Error: ResourceRequest aborted: Knex: Timeout acquiring a connection.
See original GitHub issueIssue Summary
Ghost crashed. Seeing this error:
Sep 9 03:53:47 digitalocean journal: Knex:warning - Pool2 - Error: ResourceRequest aborted: Knex: Timeout acquiring a connection.
Sep 9 03:54:12 digitalocean journal:
Sep 9 03:54:12 digitalocean journal: ERROR: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
Sep 9 03:54:12 digitalocean journal: Rendering Error Page
Sep 9 03:54:13 digitalocean journal: Ghost caught a processing error in the middleware layer.
Sep 9 03:54:13 digitalocean journal: Error: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
Sep 9 03:54:13 digitalocean journal: at /usr/src/ghost/node_modules/knex/lib/runner.js:191:30
Sep 9 03:54:13 digitalocean journal: at tryCatcher (/usr/src/ghost/node_modules/bluebird/js/release/util.js:16:23)
Sep 9 03:54:13 digitalocean journal: at /usr/src/ghost/node_modules/bluebird/js/release/catch_filter.js:17:41
Sep 9 03:54:13 digitalocean journal: at tryCatcher (/usr/src/ghost/node_modules/bluebird/js/release/util.js:16:23)
Sep 9 03:54:13 digitalocean journal: at Promise._settlePromiseFromHandler (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:504:31)
Sep 9 03:54:13 digitalocean journal: at Promise._settlePromise (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:561:18)
Sep 9 03:54:13 digitalocean journal: at Promise._settlePromise0 (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:606:10)
Sep 9 03:54:13 digitalocean journal: at Promise._settlePromises (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:681:18)
Sep 9 03:54:13 digitalocean journal: at Async._drainQueue (/usr/src/ghost/node_modules/bluebird/js/release/async.js:138:16)
Sep 9 03:54:13 digitalocean journal: at Async._drainQueues (/usr/src/ghost/node_modules/bluebird/js/release/async.js:148:10)
Sep 9 03:54:13 digitalocean journal: at Immediate.Async.drainQueues [as _onImmediate] (/usr/src/ghost/node_modules/bluebird/js/release/async.js:17:14)
Sep 9 03:54:13 digitalocean journal: at processImmediate [as _immediateCallback] (timers.js:383:17)
After a couple of these my machine died with an OOM.
Steps to Reproduce
I can’t.
Technical details:
- Ghost Version: ghost:0.10.0 via docker image
- Node Version: v4.5.0
- Browser/OS: centos-release-7-2.1511.el7.centos.2.10.x86_64 on DigitialOcean
- Database: sqlite
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:26 (11 by maintainers)
Top Results From Across the Web
node.js - Knex: Timeout acquiring a connection. The pool is ...
I am using the following code to make a knex connection, but frequently the error occurred. Knex: Timeout ...
Read more >repair broken DB | pimatic home automation forum
Knex:warning - Pool2 - Error: ResourceRequest aborted: Knex: Timeout acquiring a connection. 15:39:46.070 [pimatic] error: Startup error: ...
Read more >Strapi v4 + Postgres + Render.com = Error "Knex: Timeout ...
I am often running in the following error. I'm hosting on www.render.com. KnexTimeoutError: Knex: Timeout acquiring a connection.
Read more >Can not connect to Postgres instance
Can not connect to Postgres instance. 444 views. Skip to first unread message ... but Knex always return this error: Knex: Timeout acquiring...
Read more >Debugging Knex: Timeout acquiring a connection
Knex.js is a Javascript query builder for PostgreSQL (any many other ... The timeout acquiring a connection has been a pretty common error...
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
Hey @discordianfish - at the time this issue was raised, knex was about to swap back from pool2 to generic-pool in knex@0.12. Therefore there was little point investigating an issue in pool2. I didn’t link any specific issue as the upgrade was coming due to a general malaise with pool2 and there were many, many open issues.
The switch over to knex@0.12 and generic-pool for Ghost happened in this PR: https://github.com/TryGhost/Ghost/commit/0ea814ea81f43b64fb91afe95ce571defc5aae99, and was released in Ghost 0.11.1. Therefore if you have upgraded to 0.11.4 your install should no longer be using pool2 or getting pool2 errors.
I have also outlined why our postgres support has always been sub-optimal and will be dropped in Ghost 1.0.
This is probably related with my Docker network. I’m running only one instance of MYSQL.