-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace setInterval #454
Comments
this issue is more critical than thought, i forgot to shutdown my pc (and containers) for multiple hours, and the container was doing weird stuff. steps to reproduce:
Since the website also has issues on prod where we cannot start it after a crash, i guess it's not a local issue. I would guess it's all the setInterval creating a memory/thread mess, but could be wrong. |
update: old: new:
Some upside with this approach:
downsides:
packages that can be used: https://github.com/node-cache/node-cache |
using
setInterval
can be a huge issue described in multiple articles.just search "nodejs why setInterval is bad".
a common solution is something like https://www.npmjs.com/package/node-cron, or everything that is based on https://nodejs.org/api/events.html#class-eventemitter
The text was updated successfully, but these errors were encountered: