I've been testing Chrome headless extensively for the past few months, and while it's a good step, but it's not stable for high-volume or even diverse set of webpages. Memory usage is pretty high, lot of heavy webpages result in crashes/hangs, there are many inconsistencies between features available in full version and headless, their debugging protocol has different APIs that work on headless/non-headless in Linux…
I've been successfully using Chrome headless in a 500MB Docker container for dumping the DOM for https://www.prerender.cloud/ for months (rendering a large variety of sites without restarts for weeks at a time) Run it with: --js-flags="--max_old_space_size=500" to force the VM to keep it GC'd below 500 Chrome v55 was a 30% memory savings, before that I used 1GB containers. It's not perfect, but I am definitely pushin…
--js-flags="--max-old-space-size=500"
Hyphens not underscores.A list of V8 flags can be found with:
--js-flags="--help"