After running for a very long time (a day or more) a web-based app I wrote (JS/HTML5) starts acting "weird". Primarily it stops sending the normal data it should to the backend, where I expect it to be sending ~500kb of data it starts sending just a few bytes of nonsense. I suspected this was memory related (unable to allocate memory or something?) and when I investigated I saw something truly strange and seemingly impossible, which suggests to me that it's a Chrome bug I'm encountering perhaps through high memory usage. But I could use some confirmation from someone who knows better than I do.
The main oddness seems to be what console.memory spits out. The linked document says that "usedJsHeapSize can not be greater than totalJsHeapSize" which it very, very much is. It's also higher than the heap size limit, which I imagine it should not be:
I then tried to see what devtools might tell me and did a timeline of memory at that instant, for a few seconds, and look at what it says.... the memory ranges from some negative insanely big number to 0B. That sure doesn't seem right.
And I checked the chrome://memory report and while it is using a lot of memory, comparing that to other Chrome browsing sessions I have going it doesn't seem freakish.
Can anyone confirm this is a Chrome bug versus expected dev tools behavior I'm not interpreting correctly.
Thanks!
In Chrome, navigate to View > Developer > JavaScript Console or More Tools > JavaScript Console or press Ctrl + Shift + J. The error console will open. If you don't see any errors try reloading the page. The error may be generated when the page loads.
Shallow and retained size This gives rise to a distinction between two ways to look at the size of an object: shallow size: the size of the object itself. retained size: the size of the object itself, plus the size of other objects that are kept alive by this object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With