FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory #720
-
When fly.io introduced And since then I'm getting the following error during deploy #16 110.8 apps/***.com build: <--- Last few GCs --->
#16 110.8 apps/***.com build: [226:0x69db440] 79655 ms: Mark-Compact (reduce) 2039.4 (2081.6) -> 2039.3 (2082.1) MB, 1327.93 / 0.01 ms (+ 34.2 ms in 6 steps since start of marking, biggest step 17.1 ms, walltime since start of marking 1385 ms) (average mu = 0.304, current mu = 0.2[226:0x69db440] 81531 ms: Mark-Compact (reduce) 2039.7 (2082.3) -> 2039.7 (2082.6) MB, 1359.31 / 0.00 ms (average mu = 0.290, current mu = 0.275) allocation failure; GC in old space requested
#16 110.8 apps/***.com build: <--- JS stacktrace --->
#16 110.8 apps/***.com build: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
#16 110.8 apps/***.com build: ----- Native stack trace -----
#16 110.8 apps/***.com build: 1: 0xb84bd6 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
#16 110.8 apps/***.com build: 2: 0xefec30 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
#16 110.8 apps/***.com build: 3: 0xefef17 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
#16 110.8 apps/***.com build: 4: 0x1110925 [node]
#16 110.8 apps/***.com build: 5: 0x11287a8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
#16 110.8 apps/***.com build: 6: 0x10fe8c1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
#16 110.9 apps/***.com build: 7: 0x10ffa55 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
#16 110.9 apps/***.com build: 8: 0x10dd0a6 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
#16 110.9 apps/***.com build: 9: 0x1537fe1 v8::internal::Runtime_AllocateInOldGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
#16 110.9 apps/***.com build: 10: 0x7fc57fe99ef6
#16 111.2 apps/***.com build: Aborted (core dumped)
#16 111.2 apps/***.com build: ELIFECYCLE Command failed with exit code 134.
#16 111.2 apps/***.com build: ERROR: "build:remix" exited with 1. My project is not that large, 2 libraries and 1 app at the moment, in a monorepo managed with pnpm. The error happens while pnpm build is running inside the docker. Increasing the swap to 1024 doesn't change a thing. is someone experiencing the same issue? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
My guess is your application has a memory leak. This is a hard thing to debug. You're probably having a very different issue from the one I had in this post, but maybe this will help you know how to debug your issue: https://kentcdodds.com/blog/fixing-a-memory-leak-in-a-production-node-js-app |
Beta Was this translation helpful? Give feedback.
Thanks 😆. I am sorted now, what I did was:
someone on fly.io's forum suggested to increase the size of the VM. Apparently it could increase the size of the builder but I did not notice any change, the builder crashed at the same spot so I was not seeing it in
fly app list
h…