My puppeteer is set to work all day. He's working on one page. I have noticed a significant increase in memory each time there are changes on the page. I found this through the
browser console -> Memory tab -> JavaScript VM instance
The size of this instance is equal to the size of the occupied RAM. I can update the tab so that this size becomes zero. But I want to find out why this is happening and there is a solution to release this instance without refreshing the page?
This is a screenshot of my browser
Related
I've got a memory problem in my application. Symptoms are weird: js heap stays stable at around 30 mb, while memory footprint of a browser tab is growing over time out of bounds and eventually crashes entire mac os (I'm looking at memory footprint numbers provided by chrome's task manager). It takes several hours and I can reproduce it consistently. As heap review doesn't give me any clues at all, I'd like to examine the memory allocations for the browser tab, where my application is running. Does chrome provide any tools for that?
I am using Chrome to run a page and it runs fine for hours on end, I can attest that no memory problems rise up when it's running by itself. Whenever I use DevTools to debug something, however, the tab's memory footprint only keeps increasing and increasing (as if there was a memory leak) to the point it just crashes when it reaches the point where Chrome kills a tab due to memory limit.
Some things I could figure out were that it happens if and only if DevTools panel is open (regardless of any options?), and it happens on pretty much any website (websites that load more stuff to memory tend to bloat faster). I also found out that, if the DevTools tab is closed, the memory usage sharply drops to normal usage (something like from 900mb to 200mb, which is what it would be without DevTools), and reopening makes the tab start to bloat again from scratch. I tried running the garbage collector forcibly on Performance tab, but it also didn't do anything. I don't know what causes this, but I also couldn't find anything that refers to this issue.
Any help in this matter is appreciated.
I'm fighting a leak on a page, which makes large AJAX requests and replaces page content once in several seconds.
If I open the page in Chrome Dev Tools, I see that memory usage grows over time (from one memory snapshot to another). There are no explicit leaks on the page (the three-snapshot technique shows there are none)
According to Google Dev tools, the memory accumulated under GC Roots -> "Global handles", in some map. As I said, closing Chrome Dev Tools result in disappearing of this memory (i.e. memory usage drops from 600+Mb to 40Mb for the page). At the same time, pressing "GC" does not help, the memory remains in place.
But if the page is remained open for several hours, it may eat gigabytes and become unresponsive.
Google Chrome version is Version 60.0.3112.90 (Official Build) (64-bit) on MacOS 10.12.6.
Any hint on how to fix/avoid such memory bloat is appreciated.
I'm using the Profiles tab in the Chrome developer tools to record memory heap snapshots. My app has a memory leak, so I'm expecting the snapshots to gradually increase in size, which they do. But for reasons I don't understand, the first snapshot is always artificially large... creating a seemingly deceptive drop in memory between the first and second. All subsequent snapshots gradually increase as expected.
I know there is often extra memory used at the beginning of a page load, due to caching and other setup. But the same thing happens no matter when I take the first snapshot. It could be 30 seconds after the page is loaded or 30 minutes. Same pattern. My only guess is that the profile tool its self is interacting with the memory somehow, but that seems like a stretch.
Any ideas what's going on here?
Right before memory snapshot is taken Chrome tries to collect the garbage. It doesn't collect it thoroughly though, it only does a predefined number of passes (this magic number seems to be 7). Therefore, when the first snapshot is taken there still might be some uncollected garbage left.
Before making a first snapshot try going to the "Timeline" tab and forcing garbage collection manually.
From what I've tested, this always reduces the size of the first snapshot.
I am trying to profile the memory usage of my application using chrome's memory time line.
However i am seeing huge difference between the values reported in the time line and the values displayed by the chrome's task manager. When i profiled myweb page on chrome yesterday, the memory usage in the time line is between 11MB to 14 MB. However chrome's task manager is hovering at around 135MB Why is this difference ? If memory usage as displayed in the timeline is correct what's memory that's used by the task manager ?