totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

High CPU load after 1d #688

Closed germama closed 5 years ago

germama commented 5 years ago

Hi there! First of all - I am a heavy user of total.js and really love it - thanks for this nice pice of software.

After one day the CPU load (an RAM usage) goes constantly up until it reaches 80-90% on one core. The web frontend is not usable anymore, every request times out. Is there a way to debug, which function is causing a memory leak?

After killing the process, forever respawns it and everything is back to normal.

petersirka commented 5 years ago

Hi @germama, first of all - thank you. This is not normal behavior. Can you describe more your app?

Thank you!

germama commented 5 years ago

I recently added one more tab in Flow which contains various 3 sec timers. Those trigger a custom ping component which uses npm ping package for probing different hosts and npm influxdb to store those results in InfluxDB.

There was at least no obvious memory leak visible but I need to investigate further.

petersirka commented 5 years ago

I use Flow in some projects and without any problem:

Flow

Flow 2

Let me know if you found something....


BTW: try to enable internal debug mode in /config file:

allow_debug    : true

Framework creates an internal snapshot to /yourapp/usage.log file. If you will have high CPU then send me this file, maybe it helps.

petersirka commented 5 years ago

Some news?

germama commented 5 years ago

I believe Total.JS is working properly. Figured out that https://www.npmjs.com/package/influxdb-nodejs has some memory issues. Connecting to InfluxDB using this library and writing a dataset leads to excessive memory consumption over time.

petersirka commented 5 years ago

OK, then I'm closing this issue.