infernojs / create-inferno-app

Create Inferno apps with no build configuration.
MIT License
351 stars 34 forks source link

Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory #78

Closed sprlwrksAprilmintacpineda closed 11 months ago

sprlwrksAprilmintacpineda commented 6 years ago

I have been experiencing this error recently. I have not experienced this error before.

Compiling...

<--- Last few GCs --->

[1349:0x104801400]  1481078 ms: Mark-sweep 1389.8 (1429.0) -> 1389.3 (1437.5) MB, 995.0 / 0.0 ms  (average mu = 0.179, current mu = 0.055) allocation failure scavenge might not succeed
[1349:0x104801400]  1482212 ms: Mark-sweep 1396.0 (1437.5) -> 1394.1 (1430.5) MB, 1096.3 / 0.0 ms  (+ 0.1 ms in 107 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1135 ms) (average mu = 0.115, current mu = 0.034) alloca

<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0x19ee765c01d]
    1: StubFrame [pc: 0x19ee765d390]
Security context: 0x1d4f3d59e681 <JSObject>
    2: formatError(aka formatError) [0x1d4f13d887f1] [/Users/sprlwrks/projects/PWA-W88/node_modules/inferno-scripts/node_modules/webpack/lib/Stats.js:~186] [pc=0x19ee9997df2](this=0x1d4f69a026f1 <undefined>,e=0x1d4f646a9449 <Error map = 0x1d4f5f2d0179>)
    3: arguments adaptor frame: 3->1
    4: map [0x1d4f3d586df9](this=...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x10003907e node::Abort() [/usr/local/Cellar/node/10.11.0/bin/node]
 2: 0x10003924f node::OnFatalError(char const*, char const*) [/usr/local/Cellar/node/10.11.0/bin/node]
 3: 0x10019064b v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/10.11.0/bin/node]
 4: 0x1001905ec v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/10.11.0/bin/node]
 5: 0x10043fdb4 v8::internal::Heap::UpdateSurvivalStatistics(int) [/usr/local/Cellar/node/10.11.0/bin/node]
 6: 0x100441a27 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/usr/local/Cellar/node/10.11.0/bin/node]
 7: 0x10043f0ed v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/Cellar/node/10.11.0/bin/node]
 8: 0x10043dfd8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node/10.11.0/bin/node]
 9: 0x100446527 v8::internal::Heap::AllocateRawWithLigthRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/10.11.0/bin/node]
10: 0x100446570 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/10.11.0/bin/node]
11: 0x100426978 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/usr/local/Cellar/node/10.11.0/bin/node]
12: 0x100600ae9 v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/Cellar/node/10.11.0/bin/node]
13: 0x19ee765c01d 
14: 0x19ee765d390 
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with signal "SIGTERM".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "start-js" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Inferno meta

Havunen commented 6 years ago

Only thing we could do here is to increase heap size.

softgandhi commented 5 years ago

how to increase the heap size?

Havunen commented 5 years ago

This is how its done using plain NodeJS, but I don't know how to apply it to this project. Eject might be the only way...

node --stack_size=8192 --max-old-space-size=8192 file.js

aprilmintacpineda commented 5 years ago

Or you can create a config and use build file instead of in-memory.

Havunen commented 11 months ago

I have rebased all updates from the upstream, updated all the depencies to latest versions and converted the source code to ESM. The next major version will require Node 20 or newer.