mycontroller-v1-legacy icon indicating copy to clipboard operation
mycontroller-v1-legacy copied to clipboard

Browser memory leak

Open seant100 opened this issue 7 years ago • 15 comments

Leaving MyController open in browser, the browsers memory increases radically over time until it basically crashes the computer when it hits physical memory limit. I am using windows 10, and chrome browser.

seant100 avatar Aug 20 '17 10:08 seant100

@seant100 are you seeing this issue on dashboard only? or for entire pages?

MyController version?

jkandasa avatar Aug 21 '17 05:08 jkandasa

@jkandasa It seems to happen on all pages - but perhaps it might be limited to those pages that refresh data - where global setting is set to 30 seconds. I checked Windows Task Manager and watched the chrome memory usage and every time a page is refreshed the memory jumps up a notch. For the "Action board" page It starts around 200MB and then climbs to 400MB in about 2 to 3 minutes. Eventually bringing my computer to a grinding halt when it reaches somewhere around 2.5GB

EDIT/UPDATE: After 30 minutes the memory usage in Windows Task manager for that the MyController google chrome tab was sitting at 1.6GB

MyController is latest snapshot as of 17 Aug 2017. See System / About screenshot attached.

image

seant100 avatar Aug 21 '17 07:08 seant100

I wrote about this a year and a half ago. It seems that this mistake has not been managed. :-(

devicter avatar Sep 11 '17 03:09 devicter

@jkandasa The browser memory problem seems to have resolved itself. The issue seems to be solved with the fixing of the slow graphs issue. To resolve the slow graphs I updated to the latest Snapshot and also @cimba007 provided the updated database with the indexes added. I will let you know if the issue returns - but so far the memory leak seems to be solved for me

seant100 avatar Nov 06 '17 21:11 seant100

I would assume that auto refresh kicks in after 30 second while the first result has yet to return which might create some kind oft memory leak

Am 6. November 2017 22:06:51 MEZ schrieb Sean [email protected]:

@jkandasa The browser memory problem seems to have resolved itself. The issue seems to be solved with the fixing of the slow graphs issue. To resolve the slow graphs I updated to the latest Snapshot and also @cimba007 provided the updated database with the indexes added. I will let you know if the issue returns - but so far the memory leak seems to be solved for me

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mycontroller-org/mycontroller/issues/393#issuecomment-342286753

-- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

cimba007 avatar Nov 06 '17 21:11 cimba007

@seant100 I guess what @cimba007 saying might be true(Slow graph issue). I do not see this issue in my environment. I am using Linux(Fedora) with chrome browser.

@seant100 @devicter can you confirm still are you facing this issue?

jkandasa avatar Nov 07 '17 04:11 jkandasa

@jkandasa

Seems fine for me now.

I think @cimba007 is correct and it had something to do with slow queries taking more than the 30 seconds and then the page refresh kicks in and that ends up in an endless loop if webpage is kept open.

seant100 avatar Nov 07 '17 06:11 seant100

@jkandasa It seems there is still a problem. Its not as bad as before but the browser still has a memory leak. If I leave the browser open for a few hours the chrome tabs memory is still hitting over 1GB

seant100 avatar Nov 10 '17 10:11 seant100

yes, the problem remains

devicter avatar Nov 10 '17 13:11 devicter

Still there :D can't use the dashboard as a "dashboard"

cimba007 avatar Nov 18 '17 12:11 cimba007

@jkandasa This problem has to be fixed asap. Everytime I forget to close the dashboard and let it run in the background the tab crashes. Currently I am unable to use the dashboard as a dashboard ...

I recently had some raspberrypi crashes which might be related to this .. they only happened when i forgot to close the dashboard window (just an assumption for now) .. nothing in the logs

cimba007 avatar Nov 26 '17 21:11 cimba007

@cimba007 Sorry to hear this. So far I do not get root cause. I will try to fix this soon, if possible.

jkandasa avatar Nov 28 '17 12:11 jkandasa

It is very difficult for me too ;-( Could you point out where the "refresh" happens and where new data is set in the chart?

My assumption for now is the following:

AAAAAAAAAAAAAAAAAAA_ _BBBBBBBBBBBBBBBBBBBBBB _CCCCCCCCCCCCCCCCCCCCD

A Is the initial chart-data B After the refresh interval (30seconds) a new set of data is put into the chart. C the data might be duplicated as it did not change from A

Instead only D should be added .. the data since the last refresh occured. I am not sure but if you could point out where in the sourcecode this happens I might try to help!

cimba007 avatar Nov 28 '17 12:11 cimba007

Another reporter: https://forum.mycontroller.org/topic/294/long-running-dashboard-blows-up-in-chrome

jkandasa avatar Apr 27 '18 01:04 jkandasa

Hi, I have the same issue also with the new "1.4.0.Final" version. I am using Windows 10 and tested this in Firefox, Chrome, Edge browsers, all with the same result. After some time, the browser memory increases and tab crashes.

lejn avatar Mar 07 '19 13:03 lejn