You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consistently hitting heap limits during optimize-vscode #7108
Should the package.json also be changed to use "npm run watch"?
It's strange to me that your master builds are still running with the package.json calling "gulp watch" and mine are not, and it makes me slightly suspicious I have something else out of whack.
In any case, I'll keep digging at this side. Thanks!
I've now got to the bottom of my issue. Tyriar's above fix solved my immediate problem, but it was still falling over, which after checking my build logs turns out to have been due the Linux packaging scripts also failing for the same reason (*-build-deb).
In my case, I needed to increase the heap limit for building the packages, too, i.e.:
It may be worth adding this to your travis script for the subsequent node child scripts, or better yet, setting the increased heap size globally for the duration of the run.
Activity
jrieken commentedon Jun 2, 2016
Daniel Imms (@Tyriar) Do you run node in 32 or 64bit? The former has a heap limit of around 1GB, after that you get into GC hell
Tyriar commentedon Jun 2, 2016
Johannes Rieken (@jrieken) not sure, sounds reasonable though. I'll check it out when I'm in the office.
Tyriar commentedon Jun 6, 2016
Definitely 64 bit and still hitting this on my laptop after syncing:
jrieken commentedon Jun 7, 2016
I am not they guy for optimise. Maybe João Moreno (@joaomoreno) or alexandrudima
joaomoreno commentedon Jun 7, 2016
Yeah I've seen this in my Linux desktop, although never in our build machines...
joaomoreno commentedon Jun 7, 2016
Are you on node 5.10?
Tyriar commentedon Jun 7, 2016
João Moreno (@joaomoreno) potentially, I'll have to check. Could ./scripts/npm.sh, code.sh and/or gulp check the node version and warn on this if so?
11 remaining items
Tyriar commentedon Jan 18, 2017
This has been happening again for me on master/Windows 10/node 6.9.2.
Tyriar commentedon Jan 18, 2017
V8 has a strict heap limit of 1.7gb, it can be increased like so:
node --max-old-space-size=4096 ./node_modules/gulp/bin/gulp.js watchgulp watch --max-old-space-size=4096should also workTyriar commentedon Jan 18, 2017
We should consider either adding this to the
npm run watchscript and/or adding it to the build wiki pagejoaomoreno commentedon Jan 18, 2017
Yeah. Isidor Nikolic (@isidorn) has this too. I hit it a couple of times too.
We should add it and inform everyone to use
npm run watchinstead ofgulp watch.Increase npm run watch/compile max RAM to 4gb
headmelted commentedon Feb 7, 2017
This is still happening for me on the latest merge into my ARM builds (although it's happening for Intel 32/64 as well).
I'm trying to tune max_old_space_size and max_new_space_size ( <-- although I'm fairly sure max_new_space_size has nothing to do with the problem ).
Did Tyriar's commit (3e418e1) resolve this for you guys?
joaomoreno commentedon Feb 7, 2017
headmelted (@headmelted) Yes, make sure you use
npm run watch.headmelted commentedon Feb 9, 2017
Testing that out now.
Should the package.json also be changed to use "npm run watch"?
It's strange to me that your master builds are still running with the package.json calling "gulp watch" and mine are not, and it makes me slightly suspicious I have something else out of whack.
In any case, I'll keep digging at this side. Thanks!
joaomoreno commentedon Feb 9, 2017
What do you mean?
npm run watchwill run what's defined in package.json:gulp watch --max_old_space_size=4096.I'll change our builds to run
npm run watch. The build fails occasionally, not every time.headmelted commentedon Feb 9, 2017
I've now got to the bottom of my issue. Tyriar's above fix solved my immediate problem, but it was still falling over, which after checking my build logs turns out to have been due the Linux packaging scripts also failing for the same reason (*-build-deb).
In my case, I needed to increase the heap limit for building the packages, too, i.e.:
gulp "vscode-linux-armv7l-build-deb" --silent --max_old_space_size=4096;
It may be worth adding this to your travis script for the subsequent node child scripts, or better yet, setting the increased heap size globally for the duration of the run.
Tyriar commentedon Feb 9, 2017
I've needed to do this on Linux when building packages recently as well, we'll probably need to make the workaround more visible.
Increase npm compile max RAM to 4gb
Increase npm compile max RAM to 4gb
Increase npm run watch/compile max RAM to 4gb