vercel: `now dev` resulting in intermittent by frequent `FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory`
Hey guys,
Weโre starting to see this quite frequently now. Sometimes it will happen immediately, other times after 5mins or so.
Have tried a number of different node 10.* versions and see the same thing.
Have also tried setting export NODE_OPTIONS=--max_old_space_size=8192 and still see the same thing.
Any ideas?
[ event ] build page: /deposit
[ wait ] compiling ...
<--- Last few GCs --->
[7076:0x10280a000] 150807 ms: Scavenge 1369.2 (1408.2) -> 1367.9 (1409.2) MB, 3.6 / 0.0 ms (average mu = 0.185, current mu = 0.147) allocation failure
[7076:0x10280a000] 150815 ms: Scavenge 1369.3 (1409.2) -> 1368.3 (1411.2) MB, 3.1 / 0.0 ms (average mu = 0.185, current mu = 0.147) allocation failure
[7076:0x10280a000] 150829 ms: Scavenge 1372.3 (1412.7) -> 1370.3 (1421.2) MB, 3.1 / 0.0 ms (average mu = 0.185, current mu = 0.147) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x2a6ae3e1e6e9 <JSObject>
0: builtin exit frame: parse(aka parse)(this=0x2a6aa20826f1 <undefined>,0x2a6a81462909 <Uint8Array map = 0x2a6ae031d1c1>,0x2a6aa20826f1 <undefined>)
1: getStats [0x2a6a375f9861] [/Users/<snipped>/code/<snipped>/now/web/node_modules/autodll-webpack-plugin/lib/createMemory.js:82] [bytecode=0x2a6a93005349 offset=31](this=0x2a6a375f6bf9 <Object map = 0x2a6a14499ee1>)
2: /* anonymous */(aka ...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x10003d041 node::Abort() [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
2: 0x10003d24b node::OnFatalError(char const*, char const*) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
3: 0x1001b8e25 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
4: 0x100586d82 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
5: 0x100589855 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
6: 0x1005856ff v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
7: 0x1005838d4 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
8: 0x10059016c v8::internal::Heap::AllocateRawWithLigthRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
9: 0x1005901ef v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
10: 0x100562074 v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
11: 0x10065c5a8 v8::internal::Handle<v8::internal::String> v8::internal::JsonParser<false>::SlowScanJsonString<v8::internal::SeqTwoByteString, unsigned short>(v8::internal::Handle<v8::internal::String>, int, int) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
12: 0x10065ac7d v8::internal::JsonParser<false>::ParseJsonValue() [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
13: 0x10065e5a0 v8::internal::JsonParser<false>::ParseJsonObject() [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
14: 0x10065ae09 v8::internal::JsonParser<false>::ParseJsonValue() [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
15: 0x10065f4c2 v8::internal::JsonParser<false>::ParseJsonArray() [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
16: 0x10065acef v8::internal::JsonParser<false>::ParseJsonValue() [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
17: 0x10065ec52 v8::internal::JsonParser<false>::ParseJsonObject() [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
18: 0x10065ae09 v8::internal::JsonParser<false>::ParseJsonValue() [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
19: 0x10065a6d1 v8::internal::JsonParser<false>::ParseJson() [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
20: 0x10065a541 v8::internal::JsonParser<false>::Parse(v8::internal::Isolate*, v8::internal::Handle<v8::internal::String>, v8::internal::Handle<v8::internal::Object>) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
21: 0x100279ffc v8::internal::Builtin_Impl_JsonParse(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/<snipped>/.nvm/versions/node/v10.17.0/bin/node]
22: 0x3a6f9eadbf9d
23: 0x3a6f9ea918d5
> Error! Failed to complete request to /web/static/favicon.ico: Error: connect ECONNREFUSED 127.0.0.1:5000
> Error! Failed to complete request to /web/_next/webpack-hmr?page=%2Fwallet: Error: connect ECONNREFUSED 127.0.0.1:5000
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 34
- Comments: 15 (1 by maintainers)
FYI to anyone else encountering this error but who has set up everything correctly, it can also occur when you mistakenly recursively reference a component ๐ฑ
This is easy to fat finger and hard to debug.
Iโm also having this issue, RAM just keeps climbing and climbing. Should it be resolved by just creating an empty
staticfolder in the root?never mind, i installed latest canary version (v12.0.2-canary.8), itsโ fixed.
@Emiliano-Bucci You are right, thanks for the advice ๐
@flexbox Try installing
next@canary; it should fix your issue ๐@BouweCeunen I had to revert to putting everything in
static/and just skippingpublic/altogether.