definewater
HOBBY
a year ago
So im trying to host a simple express API with TypeORM
<--- Last few GCs --->
[27:0x2ca26d0] 5453 ms: Mark-sweep 252.5 (258.6) -> 251.7 (258.6) MB, 216.8 / 0.0 ms (average mu = 0.311, current mu = 0.241) allocation failure; scavenge might not succeed
[27:0x2ca26d0] 5742 ms: Mark-sweep 253.0 (258.8) -> 252.1 (259.1) MB, 278.5 / 0.0 ms (average mu = 0.172, current mu = 0.037) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xabe9f8 node::Abort() [node]
2: 0x9acf33 [node]
3: 0xcc2a90 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xcc2e5b v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xeab9a5 [node]
6: 0xec11e9 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
7: 0xe9c65a v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
8: 0xe9d774 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
9: 0xe7df5d v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
10: 0x126ff5c v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
11: 0x16c24b9 [node]
"scripts": {
"start": "sleep 3 && tsc && node ./build/index.js && pnpm run sync && pnpm run migrate:run",
"sync": "cd build && npx typeorm migration:generate ./migration/Init -o -d ./data-source.js",
"migrate:run": "cd build && npx typeorm migration:run -d ./data-source.js",
"typeorm": "typeorm-ts-node-commonjs"
},