I am facing some random crashes on Balena’s OS 2.36 Supervisor.
After the OS update, the app started normally but after a certain amount of time under its operation regime, it stalls. No more logs are prompted and afterwards supervisor restarts, as well ass the whole application.
I reproduced this behaviour, this time having a look at the “journalctl” and did a dump of the logs.
root@b701352:~# journalctl -f -n 1000 -u resin-supervisor
-- Logs begin at Thu 2019-06-13 11:00:47 UTC. --
Jun 13 11:04:57 b719252 resin-supervisor[32285]: Supervisor API: GET /v1/healthy 200 - 6.683 ms
Jun 13 11:09:58 b719252 resin-supervisor[32285]: Supervisor API: GET /v1/healthy 200 - 9.613 ms
Jun 13 11:14:58 b719252 resin-supervisor[32285]: Supervisor API: GET /v1/healthy 200 - 5.215 ms
Jun 13 11:19:59 b719252 resin-supervisor[32285]: Supervisor API: GET /v1/healthy 200 - 6.904 ms
Jun 13 11:22:37 b719252 resin-supervisor[32285]: (node:1) UnhandledPromiseRejectionWarning: TimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at /usr/src/app/dist/app.js:21:42906
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at c (/usr/src/app/dist/app.js:9:74428)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at /usr/src/app/dist/app.js:103:29838
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at c (/usr/src/app/dist/app.js:9:74428)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at A._settlePromiseFromHandler (/usr/src/app/dist/app.js:293:114147)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at A._settlePromise (/usr/src/app/dist/app.js:293:114947)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at A._settlePromise0 (/usr/src/app/dist/app.js:293:115646)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at A._settlePromises (/usr/src/app/dist/app.js:293:116887)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at f (/usr/src/app/dist/app.js:293:118592)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at p (/usr/src/app/dist/app.js:293:118531)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at s._drainQueues (/usr/src/app/dist/app.js:293:120051)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at Immediate.drainQueues [as _onImmediate] (/usr/src/app/dist/app.js:293:118273)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at runCallback (timers.js:705:18)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at tryOnImmediate (timers.js:676:5)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at processImmediate (timers.js:658:5)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 25)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Jun 13 11:22:37 b719252 resin-supervisor[32285]: (node:1) UnhandledPromiseRejectionWarning: TimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at /usr/src/app/dist/app.js:21:42906
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at c (/usr/src/app/dist/app.js:9:74428)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at /usr/src/app/dist/app.js:103:29838
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at c (/usr/src/app/dist/app.js:9:74428)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at A._settlePromiseFromHandler (/usr/src/app/dist/app.js:293:114147)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at A._settlePromise (/usr/src/app/dist/app.js:293:114947)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at A._settlePromise0 (/usr/src/app/dist/app.js:293:115646)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at A._settlePromises (/usr/src/app/dist/app.js:293:116887)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at f (/usr/src/app/dist/app.js:293:118592)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at p (/usr/src/app/dist/app.js:293:118531)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at s._drainQueues (/usr/src/app/dist/app.js:293:120051)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at Immediate.drainQueues [as _onImmediate] (/usr/src/app/dist/app.js:293:118273)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at runCallback (timers.js:705:18)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at tryOnImmediate (timers.js:676:5)
Jun 13 11:22:37 b719252 resin-supervisor[32285]: at processImmediate (timers.js:658:5)
As you can see, at the biginning the API responds as healthy with a 200. But afterwards those “UnhandledPromiseRejectionWarning” appear.
I would really appreciate any support on this.
Best regards.