Original post related to my issue was reboot looping of node-red. System seems to stabilize when removing majority of contect data and restoring swap memory for my system.
But I do still get random reboots from time to time (once every 1-3 days) and still the error log indicated running out of heap memory.
Attached lates error log from the time of reboot and also pictures of whoopsie.
error log:
May 6 01:03:52 SAMONE Node-RED[336912]: <--- Last few GCs --->
May 6 01:03:52 SAMONE Node-RED[336912]: [336912:0x4cc3d00] 195307453 ms: Scavenge 249.4 (261.8) -> 249.3 (266.8) MB, 2.4 / 0.0 ms (average mu = 0.962, current mu = 0.847) allocation failure
May 6 01:03:52 SAMONE Node-RED[336912]: [336912:0x4cc3d00] 195307528 ms: Mark-sweep (reduce) 251.5 (266.8) -> 251.3 (262.8) MB, 10.0 / 0.1 ms (+ 10.3 ms in 34 steps since start of marking, biggest step 4.0 ms, walltime since start of marking 75 ms) (average mu = 0.948, current mu = 0.848) fina
May 6 01:03:52 SAMONE Node-RED[336912]: <--- JS stacktrace --->
May 6 01:03:52 SAMONE Node-RED[336912]: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
May 6 01:03:52 SAMONE Node-RED[336912]: 1: 0xb090e0 node::Abort() [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 2: 0xa1b70e [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 3: 0xce19d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 4: 0xce1d77 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 5: 0xe993e5 [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 6: 0xea90ad v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 7: 0xeabd25 v8::internal::Heap::HandleGCRequest() [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 8: 0xe393c7 v8::internal::StackGuard::HandleInterrupts() [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 9: 0xf92b85 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 10: 0xf97471 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 11: 0xf97dad v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 12: 0xf953c0 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 13: 0xf947f5 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 14: 0xf97471 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 15: 0xf953c0 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 16: 0xf97471 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 17: 0xf97dad v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 18: 0xf98d8f v8::internal::JsonStringify(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 19: 0xd63c37 v8::internal::Builtin_JsonStringify(int, unsigned long*, v8::internal::Isolate*) [node-red]
May 6 01:03:52 SAMONE Node-RED[336912]: 20: 0x15d9ef9 [node-red]
May 6 01:03:52 SAMONE systemd[2242]: Starting Notification regarding a crash report...
May 6 01:03:52 SAMONE update-notifier-crash[560580]: /usr/bin/whoopsie
May 6 01:03:52 SAMONE systemd[2242]: update-notifier-crash.service: Succeeded.
May 6 01:03:52 SAMONE systemd[2242]: Finished Notification regarding a crash report.
May 6 01:03:58 SAMONE systemd[2242]: Starting Notification regarding a crash report...
May 6 01:03:58 SAMONE update-notifier-crash[560586]: /usr/bin/whoopsie
May 6 01:03:58 SAMONE systemd[1]: nodered.service: Main process exited, code=dumped, status=6/ABRT
May 6 01:03:58 SAMONE systemd[1]: nodered.service: Failed with result 'core-dump'.
May 6 01:03:58 SAMONE update-notifier-crash[560588]: node
May 6 01:03:58 SAMONE systemd[1]: nodered.service: Scheduled restart job, restart counter is at 2.
May 6 01:03:58 SAMONE systemd[1]: Stopped Node-RED graphical event wiring tool.
May 6 01:03:58 SAMONE systemd[1]: Started Node-RED graphical event wiring tool.
May 6 01:03:58 SAMONE apport-gtk[560600]: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
May 6 01:03:58 SAMONE Node-RED[560602]: 6 May 01:03:58 - [info]
May 6 01:03:58 SAMONE Node-RED[560602]: Welcome to Node-RED
May 6 01:03:58 SAMONE Node-RED[560602]: ===================
May 6 01:03:58 SAMONE Node-RED[560602]: 6 May 01:03:58 - [info] Node-RED version: v3.0.2
May 6 01:03:58 SAMONE Node-RED[560602]: 6 May 01:03:58 - [info] Node.js version: v16.20.0
May 6 01:03:58 SAMONE Node-RED[560602]: 6 May 01:03:58 - [info] Linux 5.4.0-148-generic x64 LE
May 6 01:03:59 SAMONE Node-RED[560602]: 6 May 01:03:59 - [info] Loading palette nodes
May 6 01:04:02 SAMONE Node-RED[560602]: 6 May 01:04:02 - [info] Dashboard version 3.4.0 started at /ui
May 6 01:04:02 SAMONE Node-RED[560602]: 6 May 01:04:02 - [warn] -----------------------------------------
Whoopsie pictures:
Memeory output
security@SAMONE:~$ free -h
total used free shared buff/cache available
Mem: 14Gi 7.0Gi 180Mi 214Mi 7.8Gi 7.7Gi
Swap: 4.0Gi 3.0Mi 4.0Gi
security@SAMONE:~$
Swappines=60 ;Cache Pressure = 80
In between I have downgraded my Node js to 16.20 as I saw some posts were 18.16 had created some issues (and also whoopsies was saying it is the part that had crashed)
@TotallyInformation @Steve-Mcl ; Any ideas next ?
Thanks Sami