Hi
I'm trying to understand the output of the log from why-is-node running. First of all I'm using node v8.9.4, and I'm trying to debug why tests for a project are not exiting. According to why-is-node-running there are 448 handles which are preventing the exit. It is heavily using async await and I see about 90+% are just promises, most of which have clearly resolved, since the code works and the tests passed.
- Why are these promises appearing?
- What should I do to resolve these promises so they do not maintain these handles?
I also see almost all of them twice at least.
3) Is this a bug or just reality? example:
# PROMISE
/Users/aaron/work/*/dist/test/mocha.js:27 - before(async () => {
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runnable.js:378 - var result = fn.call(ctx);
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runnable.js:370 - callFn(this.fn);
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runner.js:304 - hook.run(function (err) {
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runner.js:334 - next(0);
# PROMISE
/Users/aaron/work/*/dist/test/mocha.js:28 - await redis_1.default.hset("mission-events", "totalBalance", "[\"savings\"]");
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runnable.js:378 - var result = fn.call(ctx);
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runnable.js:370 - callFn(this.fn);
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runner.js:304 - hook.run(function (err) {
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runner.js:334 - next(0);
# PROMISE
/Users/aaron/work/*/dist/test/mocha.js:28 - await redis_1.default.hset("mission-events", "totalBalance", "[\"savings\"]");
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runnable.js:378 - var result = fn.call(ctx);
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runnable.js:370 - callFn(this.fn);
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runner.js:304 - hook.run(function (err) {
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runner.js:334 - next(0);
# PROMISE
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runnable.js:382 - .then(function () {
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runnable.js:370 - callFn(this.fn);
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runner.js:304 - hook.run(function (err) {
/Users/aaron/.nvm/versions/node/v8.9.4/lib/node_modules/mocha/lib/runner.js:334 - next(0);
Could you give a bit more info about what the following types of things are and how to resolve them? They are fairly suggestive but trying to banish any doubt.
4) # TickObject (unknown stack trace)
5) # immediate (setImmediate?)
6) # TCPWRAP
Hi
I'm trying to understand the output of the log from why-is-node running. First of all I'm using node v8.9.4, and I'm trying to debug why tests for a project are not exiting. According to why-is-node-running there are 448 handles which are preventing the exit. It is heavily using async await and I see about 90+% are just promises, most of which have clearly resolved, since the code works and the tests passed.
I also see almost all of them twice at least.
3) Is this a bug or just reality? example:
Could you give a bit more info about what the following types of things are and how to resolve them? They are fairly suggestive but trying to banish any doubt.
4) # TickObject (unknown stack trace)
5) # immediate (setImmediate?)
6) # TCPWRAP