Skip to content

Commit c6f417f

Browse files
committed
fix: remove why-is-node-running from prod
Still sticking around for development - it works well, but I suspect it's causing some nasty long-term memory leaks, since all my projects using it are reaching 1.5 GB memory after ~2 months.
1 parent 0bff95b commit c6f417f

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "krist",
3-
"version": "3.5.2",
3+
"version": "3.5.3",
44
"description": "The new Krist node written in TypeScript.",
55
"type": "module",
66
"scripts": {
77
"build": "tsc -p tsconfig.json",
88
"start": "node dist/src/index.js",
9-
"dev": "tsx src/index.ts",
9+
"dev": "tsx --import why-is-node-running/include.js src/index.ts",
1010
"docs": "apidoc -v -t apidoc-template -i src -o static/docs",
1111
"test": "cross-env TS_NODE_PROJECT='./tsconfig.test.json' NODE_ENV=test mocha 'test/**/*.test.ts'",
1212
"test:coverage": "nyc pnpm run test",

src/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import "dotenv/config";
2323

2424
import chalkT from "chalk-template";
25-
import whyIsNodeRunning from "why-is-node-running";
2625
import packageJson from "../package.json" with { type: "json" };
2726
import { initDatabase, shutdownDb } from "./database/index.js";
2827
import { initRedis, shutdownRedis } from "./database/redis.js";
@@ -60,11 +59,6 @@ function shutdown() {
6059
shutdownAuthLogCleanup();
6160
shutdownWebSocketIpc();
6261
})().catch(console.error);
63-
64-
setTimeout(() => {
65-
console.log("Still shutting down?");
66-
whyIsNodeRunning();
67-
}, 8000).unref();
6862
}
6963

7064
process.on("SIGINT", shutdown);

0 commit comments

Comments
 (0)