Node crashes 134

When I deploy my node/express app it crashes with the following logs

> ts-node server.ts --max-old-space-size=512
 1: 0xde0c10 node::Abort() [node]
 2: 0xcb205b  [node]
 3: 0x1029630 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 4: 0x1029917 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 5: 0x1248e95  [node]
 6: 0x124936e  [node]
 7: 0x125e596 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [node]
 8: 0x125f0b9  [node]
 9: 0x125f6c8  [node]
10: 0x19af221  [node]
Aborted (core dumped)
<--- Last few GCs --->
[84:0x6c235f0]    19286 ms: Mark-Compact 250.8 (258.6) -> 249.2 (258.8) MB, 688.72 / 0.00 ms  (average mu = 0.435, current mu = 0.015) allocation failure; scavenge might not succeed
[84:0x6c235f0]    19997 ms: Mark-Compact 250.4 (258.8) -> 248.6 (259.1) MB, 702.13 / 0.00 ms  (average mu = 0.247, current mu = 0.012) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
 1: 0xde0c10 node::Abort() [node]
 2: 0xcb205b  [node]
 3: 0x1029630 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 4: 0x1029917 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 5: 0x1248e95  [node]
 6: 0x125f9b8  [node]
 7: 0x1236ebe v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 8: 0x12381a4 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 9: 0x1215d65 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
10: 0x164653c v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
11: 0x1ad63f6  [node]
Aborted (core dumped)

I am on the starter plan. I run my server with “ts-node server.ts --max-old-space-size=512” which i thought would take advantage of all the ram on the starter plan. I am unable to recreate the issue locally. Any ideas?

figured out the issue. its because i was deploying with ts-node. based on https://github.com/TypeStrong/ts-node/issues/104#issuecomment-250252708 you can use it in production with minimal overhead with the “–transpile-only”. it now runs on my render instance

Hi,

Thanks for sharing your solution with the community.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.