Reputation: 2738
I have a NodeJS app that seems to have an infinite loop due to persistent 100% CPU usage - https://github.com/3PG/Bot.
IDE: VSCode
I have changed many files and lines of code since June, but the problem still persists. I believe it is caused by an infinite loop.
How would I detect infinite loops in Node.js for TypeScript project?
Upvotes: 1
Views: 1549
Reputation: 106
I tried setting up your bot to try and replicate the situation. I disabled the API Module, XP Module, Bot Stats module and Music Module so that I could easily set it up without having to do much configuration. As you can see here, I can't replicate your situation as the Bot is running and it's using 0% of the CPU. It may have to do with the specs of your PC, but I can't replicate, so what I suggest to do is try and disabling various modules, so that you can find the one that's causing the CPU to burst.
I hope I helped you ;)
Upvotes: 2