cooljeanius / tweetback

Take ownership of your Twitter data and get your tweets back
https://cooljeanius.github.io/tweetback/
MIT License
2 stars 0 forks source link

node crashes on `npm run start` #1

Closed cooljeanius closed 1 year ago

cooljeanius commented 1 year ago

just putting backtrace here for now; will figure out later:

Image request error Bad response for https://pbs.twimg.com/media/DqZjULWWwAAT2ET.jpg (404): Not Found

<--- Last few GCs --->

[81732:0x1049f3000]  2561656 ms: Mark-sweep 4035.2 (4132.1) -> 4019.7 (4132.9) MB, 7959.6 / 0.0 ms  (average mu = 0.139, current mu = 0.062) allocation failure scavenge might not succeed
[81732:0x1049f3000]  2568953 ms: Mark-sweep 4035.9 (4132.9) -> 4020.6 (4133.6) MB, 6809.6 / 0.0 ms  (average mu = 0.107, current mu = 0.067) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x1000ac866 node::Abort() [/opt/local/bin/node]
 2: 0x1000ac9e2 node::OnFatalError(char const*, char const*) [/opt/local/bin/node]
 3: 0x1001eba51 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/local/bin/node]
 4: 0x1001eb9fb v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/local/bin/node]
 5: 0x10032ec73 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/opt/local/bin/node]
 6: 0x10032ff40 v8::internal::Heap::MarkCompactPrologue() [/opt/local/bin/node]
 7: 0x10032d80f v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/opt/local/bin/node]
 8: 0x10032bddd v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/local/bin/node]
 9: 0x100334aee v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/local/bin/node]
10: 0x100334b4a v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/local/bin/node]
11: 0x10030c64a v8::internal::FactoryBase<v8::internal::Factory>::NewStruct(v8::internal::InstanceType, v8::internal::AllocationType) [/opt/local/bin/node]
12: 0x10031dba5 v8::internal::Factory::NewStackFrameInfo(v8::internal::Handle<v8::internal::FrameArray>, int) [/opt/local/bin/node]
13: 0x1004edfad v8::internal::StackTraceFrame::InitializeFrameInfo(v8::internal::Handle<v8::internal::StackTraceFrame>) [/opt/local/bin/node]
14: 0x1004ed857 v8::internal::StackTraceFrame::GetFrameInfo(v8::internal::Handle<v8::internal::StackTraceFrame>) [/opt/local/bin/node]
15: 0x1004ee177 v8::internal::SerializeStackTraceFrame(v8::internal::Isolate*, v8::internal::Handle<v8::internal::StackTraceFrame>, v8::internal::IncrementalStringBuilder*) [/opt/local/bin/node]
16: 0x1004ef4af v8::internal::SerializeStackTraceFrame(v8::internal::Isolate*, v8::internal::Handle<v8::internal::StackTraceFrame>) [/opt/local/bin/node]
17: 0x100248ebf v8::internal::Builtin_Impl_CallSitePrototypeToString(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/opt/local/bin/node]
18: 0x100838c39 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/opt/local/bin/node]
19: 0x10086ba2a Builtins_OrdinaryToPrimitive_String [/opt/local/bin/node]
20: 0x10086b811 Builtins_NonPrimitiveToPrimitive_String [/opt/local/bin/node]
Abort trap: 6
AramZS commented 1 year ago

You are going to need to allow Node to use more memory. I will warn that this may cause strange behavior from your device, but it usually does work. I have a package.json command for this. But that also dumps the build record to a file for debug purposes. The important part is NODE_OPTIONS=--max-old-space-size=12288 which raises the amount of memory Node can claim on my system to 12,288 MB. It appears to only works with multiples of 1024 (1 Gig) and, at least on Linux systems, you cannot make it larger than your on-board RAM, even if you have plenty of Swap space.

cooljeanius commented 1 year ago

You are going to need to allow Node to use more memory. I will warn that this may cause strange behavior from your device, but it usually does work. I have a package.json command for this. But that also dumps the build record to a file for debug purposes. The important part is NODE_OPTIONS=--max-old-space-size=12288 which raises the amount of memory Node can claim on my system to 12,288 MB. It appears to only works with multiples of 1024 (1 Gig) and, at least on Linux systems, you cannot make it larger than your on-board RAM, even if you have plenty of Swap space.

ok yeah that seems to have worked

cooljeanius commented 1 year ago

(unfortunately cooljeanius/my_tweetback_archive#1 still seems to be an issue, though...)

cooljeanius commented 8 months ago

update: had to raise the amount from 12288 to 24576 on my latest run...