-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS heap out of memory when using gulp serve
#45
Comments
I noticed this as well occasionally, but haven't found a good solution to it. I'll try get a closer look at it or if someone out there has some extra time over, feel free to chime in |
I had a quick look at it using the Chrome dev tools to connect to the gulp node process and it looks like it might be a leak in ts-loader. I saw lots of duplicate strings containing what looked like generated Javascript, and the owner stack led back to ts-loader. If I have some more time later I can try digging deeper to determine where specifically this might be happening. |
It has nothing to do with a leak in the ts-loader. The issue comes from NodeJS 8 where they introduced really low memory cap 1.4GB per NodeJS process. The only option to get around this limitation is to start gulp serve --max-old-space-size=8192 This will set the appropriate Node flag to use a max of 8Gb or whatever value you pass in. Pre-NodeJS 8 a process could use as many memory as they want or request. |
Closing this as resolved both since the build pipeline is rebuilt and the solution provided by @StfBauer above |
I have same behavior on Node 10.15. Adding max space 8192 postpones the problem for some time. |
When using
gulp serve --debug
, after some number of rebuilds due to file changes, the gulp process will crash with an out of memory error. I haven't counted how many rebuilds it takes but it's probably at least 10 or so. The callstack varies a lot.The text was updated successfully, but these errors were encountered: