Ghost: Error:: Knex:warning - Pool2 - Error: ResourceRequest aborted: Knex: Timeout acquiring a connection.
Issue 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
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 26 (11 by maintainers)
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.
Ran into the same issue but with psotgres.
@ErisDS Are you in general not tracking bugs in things you depend on? I’d argue it’s a bug in Ghost to depend on a buggy module.