FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
yarn run v1.22.22
$ nest start
<--- Last few GCs --->
[35:0x30af8d0] 5028 ms: Scavenge 252.3 (257.9) -> 251.9 (258.4) MB, 1.7 / 0.0 ms (average mu = 0.511, current mu = 0.262) allocation failure;
[35:0x30af8d0] 5233 ms: Mark-sweep 252.6 (258.4) -> 251.9 (258.9) MB, 203.0 / 0.0 ms (average mu = 0.319, current mu = 0.075) allocation failure; scavenge might not succeed
[35:0x30af8d0] 5608 ms: Mark-sweep 253.0 (258.9) -> 252.3 (259.2) MB, 316.5 / 0.0 ms (average mu = 0.222, current mu = 0.158) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xab4728 node::Abort() [/nix/store/5l687mklyr9rhhbvvpvi93zv0zbbi4vg-nodejs-18.18.2/bin/node]
2: 0x9a4839 [/nix/store/5l687mklyr9rhhbvvpvi93zv0zbbi4vg-nodejs-18.18.2/bin/node]
3: 0xcc23e0 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/nix/store/5l687mklyr9rhhbvvpvi93zv0zbbi4vg-nodejs-18.18.2/bin/node]
4: 0xcc27ab v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/nix/store/5l687mklyr9rhhbvvpvi93zv0zbbi4vg-nodejs-18.18.2/bin/node]
5: 0xea6cc5 [/nix/store/5l687mklyr9rhhbvvpvi93zv0zbbi4vg-nodejs-18.18.2/bin/node]
6: 0xebb109 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/nix/store/5l687mklyr9rhhbvvpvi93zv0zbbi4vg-nodejs-18.18.2/bin/node]
7: 0xe9789a v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/nix/store/5l687mklyr9rhhbvvpvi93zv0zbbi4vg-nodejs-18.18.2/bin/node]
...
Aborted (core dumped)
error Command failed with exit code 134.
project_id: 56192e25-8635-43f0-bd63-0b4a6fc73009
12 Replies
Project ID:
56192e25-8635-43f0-bd63-0b4a6fc73009
I have a hobby account and I`m trying to deploy a nestJS application
Seems like it tried to use more than 8gb of memory
![No description](https://cdn.answeroverflow.com/1227752570450087936/Captura_de_Tela_2024-04-10_as_23.50.12.png)
but when I saw from here don't calculate all the 8gb
that graph auto scales
its entirely possible and has happened before, that your app tried to use more than 8gb and crashed all before railway took a metrics recording
is it possible to calculate the memory locally to have a notion of the size?
if you are somehow able to record at a high frequency how much memory your app uses, sure
i can offer to run it on my pro workspace to see if it is a memory limitation
it is okay to me
what is okay exactly?
😅
to run in your pro workspace
okay how would i go about doing that, give me the repo, the environment variables, etc, everything id need to run your app