FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

dylan's Avatar

dylan

12 Feb, 2018 02:49 AM

hi guys,

I'm having an intermittent issue with webpack building. It's not every time but it's happening more and more often and funnily enough it doesn't really seem related to any changes in the app itself.

The message is:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

It occurs during webpack building of an angular 5 AOT build. I can provide more information if required. It doesn't occur on dev machines in the same conditions and it's only started happening recently on appveyor, with only small incremental changes to the application.

Any ideas?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 12 Feb, 2018 07:57 PM

    Ilya Finkelshteyn's Avatar

    Hi Dylan,

    Please try to modify max-old-space-size according to this article. You can set it to 3072 or even 4096.

    If this does not help, we can let you ruin your builds on GCE (https://www.appveyor.com/docs/build-environment/#build-vm-configura...), which has more memory.

    Ilya.

  2. 2 Posted by dylan on 13 Feb, 2018 12:14 AM

    dylan's Avatar

    Excellent, trying this.

    The exact command I used (incase anyone else finds they have to do a global install of webpack via npm) was:

    node --max-old-space-size=1024 %AppData%/npm/node_modules/webpack/bin/webpack.js --config "config/webpack.prod.appveyor.js"

    I only bumped it to 1024 because the default is 512 and it was already getting through most of the time. will bump it further if needed.

    Thank you very much for the help, it appears to be working fine but I'll monitor it.

  3. 3 Posted by dylan on 13 Feb, 2018 04:30 AM

    dylan's Avatar

    It not only appears to be working it's gone from a 26 minute build to a 14 minute build overall!!

    Great result.

  4. Support Staff 4 Posted by Ilya Finkelshte... on 13 Feb, 2018 06:21 AM

    Ilya Finkelshteyn's Avatar

    Great, thanks a lot for the update!

  5. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:26 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac