Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

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

Closed
valera1401 opened this issue Oct 1, 2018 · 5 comments

Comments

@valera1401
Copy link

valera1401 commented Oct 1, 2018

<--- Last few GCs --->

[13824:0000023F71E8B840]   131962 ms: Mark-sweep 1393.1 (1504.1) -> 1392.9 (1506.1) MB, 1850.0 / 0.0 ms  allocation failure GC in old space requested
[13824:0000023F71E8B840]   133649 ms: Mark-sweep 1392.9 (1506.1) -> 1392.8 (1474.6) MB, 1686.4 / 0.0 ms  last resort GC in old space requested
[13824:0000023F71E8B840]   135484 ms: Mark-sweep 1392.8 (1474.6) -> 1392.8 (1474.1) MB, 1834.9 / 0.0 ms  last resort GC in old space requested

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0000036CA7CA5879 <JSObject>
    1: stringSlice(aka stringSlice) [buffer.js:560] [bytecode=000003C26256C879 offset=94](this=0000010F57C822D1 <undefined>,buf=000002CA2157F8B9 <Uint8Array map = 0000027F4D7C3AC9>,encoding=0000036CA7CB5259 <String[4]: utf8>,start=0,end=603400)
    2: toString [buffer.js:~609] [pc=0000007D9BBD1EA8](this=000002CA2157F8B9 <Uint8Array map = 0000027F4D7C3AC9>,encoding=0000036CA7CB5259 <String[4]: ...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node_module_register
 2: v8::internal::FatalProcessOutOfMemory
 3: v8::internal::FatalProcessOutOfMemory
 4: v8::internal::Factory::NewRawOneByteString
 5: v8::internal::Factory::NewStringFromOneByte
 6: v8::internal::Factory::NewStringFromUtf8
 7: v8::String::NewFromUtf8
 8: v8::internal::compiler::Type::Negative31
 9: std::vector<v8::CpuProfileDeoptFrame,std::allocator<v8::CpuProfileDeoptFrame> >::vector<v8::CpuProfileDeoptFrame,std::allocator<v8::CpuProfileDeoptFrame> >
10: v8::internal::wasm::SignatureMap::Find
11: v8::internal::Builtins::CallableFor
12: v8::internal::Builtins::CallableFor
13: v8::internal::Builtins::CallableFor
14: 0000007D9B3043C1
Executing webpack failed with exit code 3.
@NickIliev
Copy link
Contributor

NickIliev commented Oct 2, 2018

@valera1401 please check the solutions provided here and here which are increasing the heap space with the node flag --max_old_space_size

If the above solution does not help then please provide a detailed information about the project you are building and your environment specifics.

@valera1401
Copy link
Author

@NickIliev Thank you.
It works with set NODE_OPTIONS=--max-old-space-size=4096

@valera1401 valera1401 reopened this Oct 3, 2018
@valera1401
Copy link
Author

valera1401 commented Oct 3, 2018

I've reopened the issue because I have 1 more question.

How to be with Sidekick cloud build ? Because I have the same error, when I try to make cloud build of the project with sidekick.

@tsvetie
Copy link

tsvetie commented Oct 5, 2018

Hi @valera1401,

Currently, there is no way to set this for a cloud build. Can you share your package.json file - I would like to check why you get this error with a cloud build?

@valera1401
Copy link
Author

valera1401 commented Oct 5, 2018

The error occurs when ts-loader is used for web worker file.

From webpack.config.js
{
test: /(?:.ngfactory.js|.ngstyle.js|.ts)$/,
exclude: /.worker.ts$/,
use: [
"nativescript-dev-webpack/moduleid-compat-loader",
"@ngtools/webpack",
]
},

{ test: /.worker.ts$/, loader: "ts-loader" },

Anyway currently I don't use ts-loader because nativescript worker-loader is broken, and I had to rewrite the worker with js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants